Re: r320162 - Revert "Unify implementation of our two different flavours of -Wtautological-compare."
It also caused all the sanitizer builds to fail. For example: http://lab.llvm.org:8011/builders/sanitizer-ppc64le-linux/builds/3654 /home/buildbots/ppc64le-sanitizer/sanitizer-ppc64le/build/llvm/utils/TableGen/X86RecognizableInstr.cpp:789:21: error: comparison of constant -1 with expression of type 'llvm::X86Disassembler::OpcodeType' is always true [-Werror,-Wtautological-constant-out-of-range-compare] assert(opcodeType != (OpcodeType)-1 && ~~ ^ ~~ /usr/include/assert.h:86:5: note: expanded from macro 'assert' ((expr) \ ^~~~ 1 error generated. utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/build.make:1022: recipe for target 'utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o' failed make[3]: *** [utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/X86RecognizableInstr.cpp.o] Error 1 And there are lots more warnings (which are flagged as errors for the sanitizer builds) when I run a build by hand. For example: [4001/4008] Building CXX object tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndex.cpp.o In file included from /home/seurer/llvm/llvm-test2/tools/clang/tools/libclang/CIndex.cpp:23: In file included from /home/seurer/llvm/llvm-test2/tools/clang/tools/libclang/CursorVisitor.h:16: In file included from /home/seurer/llvm/llvm-test2/tools/clang/include/clang/AST/DeclVisitor.h:19: In file included from /home/seurer/llvm/llvm-test2/tools/clang/include/clang/AST/DeclCXX.h:21: In file included from /home/seurer/llvm/llvm-test2/tools/clang/include/clang/AST/Attr.h:19: /home/seurer/llvm/llvm-test2/tools/clang/include/clang/AST/Expr.h:2745:17: warning: comparison of constant -1 with expression of type 'const clang::CastKind' is always true [-Wtautological-constant-out-of-range-compare] assert(kind != CK_Invalid && "creating cast with invalid cast kind"); ^ ~~ /usr/include/assert.h:89:5: note: expanded from macro 'assert' ((expr) \ ^~~~ On 12/08/2017 10:54 AM, Hans Wennborg via cfe-commits wrote: Author: hans Date: Fri Dec 8 08:54:08 2017 New Revision: 320162 URL: http://llvm.org/viewvc/llvm-project?rev=320162=rev Log: Revert "Unify implementation of our two different flavours of -Wtautological-compare." Unify implementation of our two different flavours of -Wtautological-compare. In so doing, fix a handful of remaining bugs where we would report false positives or false negatives if we promote a signed value to an unsigned type for the comparison. This caused a new warning in Chromium: ../../base/trace_event/trace_log.cc:1545:29: error: comparison of constant 64 with expression of type 'unsigned int' is always true [-Werror,-Wtautological-constant-out-of-range-compare] DCHECK(handle.event_index < TraceBufferChunk::kTraceBufferChunkSize); ~~ ^ ~~~ The 'unsigned int' is really a 6-bit bitfield, which is why it's always less than 64. I thought we didn't use to warn (with out-of-range-compare) when comparing against the boundaries of a type? Modified: cfe/trunk/lib/Sema/SemaChecking.cpp cfe/trunk/test/Sema/tautological-constant-compare.c cfe/trunk/test/Sema/tautological-constant-enum-compare.c cfe/trunk/test/SemaCXX/compare.cpp Modified: cfe/trunk/lib/Sema/SemaChecking.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=320162=320161=320162=diff == --- cfe/trunk/lib/Sema/SemaChecking.cpp (original) +++ cfe/trunk/lib/Sema/SemaChecking.cpp Fri Dec 8 08:54:08 2017 @@ -8662,113 +8662,54 @@ static bool isKnownToHaveUnsignedValue(E } namespace { -/// The promoted range of values of a type. In general this has the -/// following structure: -/// -/// |---| . . . |---| -/// ^ ^ ^ ^ -///Min HoleMin HoleMax Max -/// -/// ... where there is only a hole if a signed type is promoted to unsigned -/// (in which case Min and Max are the smallest and largest representable -/// values). -struct PromotedRange { - // Min, or HoleMax if there is a hole. - llvm::APSInt PromotedMin; - // Max, or HoleMin if there is a hole. - llvm::APSInt PromotedMax; - - PromotedRange(IntRange R, unsigned BitWidth, bool Unsigned) { -if (R.Width == 0) - PromotedMin = PromotedMax = llvm::APSInt(BitWidth, Unsigned); -else { - PromotedMin = llvm::APSInt::getMinValue(R.Width, R.NonNegative) -.extOrTrunc(BitWidth); - PromotedMin.setIsUnsigned(Unsigned); - - PromotedMax = llvm::APSInt::getMaxValue(R.Width, R.NonNegative) -.extOrTrunc(BitWidth); - PromotedMax.setIsUnsigned(Unsigned); -} - } - // Determine whether this range is contiguous (has
Re: [clang-tools-extra] r291446 - [include-fixer] Load symbol index asynchronously.
On 01/10/2017 01:53 PM, Benjamin Kramer wrote: I didn't manage to reproduce this. Does adding ${PTHREAD_LIB} to LINK_LIBS of tools/clang/tools/extra/include-fixer/plugin/CMakeLists.txt help? That does seem to make it work. On Tue, Jan 10, 2017 at 8:31 PM, Bill Seurerwrote: On 01/09/2017 09:18 AM, Benjamin Kramer via cfe-commits wrote: Author: d0k Date: Mon Jan 9 09:18:28 2017 New Revision: 291446 URL: http://llvm.org/viewvc/llvm-project?rev=291446=rev Log: [include-fixer] Load symbol index asynchronously. We don't actually need the index until parse time, so fetch it in the background and start parsing. By the time it is actually needed it's likely that the loading phase has completed in the background. This update causes a linker error on ppc64le on a Release+Asserts+Shared build. cmake with -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DBUILD_SHARED_LIBS=ON http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/754 Details: [117/123] Linking CXX shared library lib/libclangIncludeFixerPlugin.so.40.0svn FAILED: : && /home/seurer/gcc/install/gcc-5.4.0/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -L/home/seurer/gcc/install/gcc-5.4.0/lib64 -Wl,-z,defs -Wl,-rpath-link,/home/seurer/llvm/build/llvm-test2/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libclangIncludeFixerPlugin.so.40 -o lib/libclangIncludeFixerPlugin.so.40.0svn tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o lib/libclangAST.so.40.0svn lib/libclangBasic.so.40.0svn lib/libclangFrontend.so.40.0svn lib/libclangIncludeFixer.so.40.0svn lib/libclangParse.so.40.0svn lib/libclangSema.so.40.0svn lib/libclangTooling.so.40.0svn lib/libLLVMSupport.so.40.0svn -Wl,-rpath,"\$ORIGIN/../lib" && : tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o:(.toc+0xb0): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status [117/123] Building CXX object tools/clang/tools/extra/include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o ninja: build stopped: subcommand failed. [1/7] Linking CXX shared library lib/libclangIncludeFixerPlugin.so.40.0svn FAILED: : && /home/seurer/gcc/install/gcc-5.4.0/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -L/home/seurer/gcc/install/gcc-5.4.0/lib64 -Wl,-z,defs -Wl,-rpath-link,/home/seurer/llvm/build/llvm-test2/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libclangIncludeFixerPlugin.so.40 -o lib/libclangIncludeFixerPlugin.so.40.0svn tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o lib/libclangAST.so.40.0svn lib/libclangBasic.so.40.0svn lib/libclangFrontend.so.40.0svn lib/libclangIncludeFixer.so.40.0svn lib/libclangParse.so.40.0svn lib/libclangSema.so.40.0svn lib/libclangTooling.so.40.0svn lib/libLLVMSupport.so.40.0svn -Wl,-rpath,"\$ORIGIN/../lib" && : tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o:(.toc+0xb0): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h clang-tools-extra/trunk/include-fixer/plugin/IncludeFixerPlugin.cpp clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp?rev=291446=291445=291446=diff == --- clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp (original) +++ clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp Mon Jan 9 09:18:28 2017 @@ -64,7 +64,7 @@ SymbolIndexManager::search(llvm::StringR do { std::vector Symbols; for (const auto : SymbolIndices) { - auto Res = DB->search(Names.back().str()); + auto Res = DB.get()->search(Names.back()); Symbols.insert(Symbols.end(), Res.begin(), Res.end()); } Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h URL:
Re: [clang-tools-extra] r291446 - [include-fixer] Load symbol index asynchronously.
On 01/09/2017 09:18 AM, Benjamin Kramer via cfe-commits wrote: Author: d0k Date: Mon Jan 9 09:18:28 2017 New Revision: 291446 URL: http://llvm.org/viewvc/llvm-project?rev=291446=rev Log: [include-fixer] Load symbol index asynchronously. We don't actually need the index until parse time, so fetch it in the background and start parsing. By the time it is actually needed it's likely that the loading phase has completed in the background. This update causes a linker error on ppc64le on a Release+Asserts+Shared build. cmake with -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DBUILD_SHARED_LIBS=ON http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/754 Details: [117/123] Linking CXX shared library lib/libclangIncludeFixerPlugin.so.40.0svn FAILED: : && /home/seurer/gcc/install/gcc-5.4.0/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -L/home/seurer/gcc/install/gcc-5.4.0/lib64 -Wl,-z,defs -Wl,-rpath-link,/home/seurer/llvm/build/llvm-test2/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libclangIncludeFixerPlugin.so.40 -o lib/libclangIncludeFixerPlugin.so.40.0svn tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o lib/libclangAST.so.40.0svn lib/libclangBasic.so.40.0svn lib/libclangFrontend.so.40.0svn lib/libclangIncludeFixer.so.40.0svn lib/libclangParse.so.40.0svn lib/libclangSema.so.40.0svn lib/libclangTooling.so.40.0svn lib/libLLVMSupport.so.40.0svn -Wl,-rpath,"\$ORIGIN/../lib" && : tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o:(.toc+0xb0): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status [117/123] Building CXX object tools/clang/tools/extra/include-fixer/tool/CMakeFiles/clang-include-fixer.dir/ClangIncludeFixer.cpp.o ninja: build stopped: subcommand failed. [1/7] Linking CXX shared library lib/libclangIncludeFixerPlugin.so.40.0svn FAILED: : && /home/seurer/gcc/install/gcc-5.4.0/bin/g++ -fPIC -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -L/home/seurer/gcc/install/gcc-5.4.0/lib64 -Wl,-z,defs -Wl,-rpath-link,/home/seurer/llvm/build/llvm-test2/./lib -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname,libclangIncludeFixerPlugin.so.40 -o lib/libclangIncludeFixerPlugin.so.40.0svn tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o lib/libclangAST.so.40.0svn lib/libclangBasic.so.40.0svn lib/libclangFrontend.so.40.0svn lib/libclangIncludeFixer.so.40.0svn lib/libclangParse.so.40.0svn lib/libclangSema.so.40.0svn lib/libclangTooling.so.40.0svn lib/libLLVMSupport.so.40.0svn -Wl,-rpath,"\$ORIGIN/../lib" && : tools/clang/tools/extra/include-fixer/plugin/CMakeFiles/clangIncludeFixerPlugin.dir/IncludeFixerPlugin.cpp.o:(.toc+0xb0): undefined reference to `pthread_create' collect2: error: ld returned 1 exit status Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h clang-tools-extra/trunk/include-fixer/plugin/IncludeFixerPlugin.cpp clang-tools-extra/trunk/include-fixer/tool/ClangIncludeFixer.cpp clang-tools-extra/trunk/unittests/include-fixer/IncludeFixerTest.cpp Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp?rev=291446=291445=291446=diff == --- clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp (original) +++ clang-tools-extra/trunk/include-fixer/SymbolIndexManager.cpp Mon Jan 9 09:18:28 2017 @@ -64,7 +64,7 @@ SymbolIndexManager::search(llvm::StringR do { std::vector Symbols; for (const auto : SymbolIndices) { - auto Res = DB->search(Names.back().str()); + auto Res = DB.get()->search(Names.back()); Symbols.insert(Symbols.end(), Res.begin(), Res.end()); } Modified: clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h?rev=291446=291445=291446=diff == --- clang-tools-extra/trunk/include-fixer/SymbolIndexManager.h (original)
[clang-tools-extra] r289581 - [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64le
Author: seurer Date: Tue Dec 13 14:26:35 2016 New Revision: 289581 URL: http://llvm.org/viewvc/llvm-project?rev=289581=rev Log: [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64le The test case clang-tidy/readability-identifier-naming.cpp segfaults on powerpc64 little endian (starting with r288563) when a bootstrap build/test is done. To get the buildbot running again deactivate the test. When the issue is resolved reactivate it. Modified: clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp?rev=289581=289580=289581=diff == --- clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp (original) +++ clang-tools-extra/trunk/test/clang-tidy/readability-identifier-naming.cpp Tue Dec 13 14:26:35 2016 @@ -1,3 +1,6 @@ +// Remove UNSUPPORTED for powerpc64le when the problem introduced by +// r288563 is resolved. +// UNSUPPORTED: powerpc64le // RUN: %check_clang_tidy %s readability-identifier-naming %t -- \ // RUN: -config='{CheckOptions: [ \ // RUN: {key: readability-identifier-naming.AbstractClassCase, value: CamelCase}, \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r283537 - Revert "[analyzer] Try to re-apply r283092 "Extend bug reports with extra notes"
On 10/07/16 05:56, Artem Dergachev via cfe-commits wrote: > Author: dergachev > Date: Fri Oct 7 05:56:44 2016 > New Revision: 283537 > > URL: http://llvm.org/viewvc/llvm-project?rev=283537=rev One of these recent changes introduced a problem in sanitizer testing. /home/seurer/llvm/build/llvm-test2/bin/clang++ -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_OBJC_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/seurer/llvm/build/llvm-test/tools/clang/lib/StaticAnalyzer/Core -I/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core -I/home/seurer/llvm/llvm-test/tools/clang/include -I/home/seurer/llvm/build/llvm-test/tools/clang/include -I/home/seurer/llvm/build/llvm-test/include -I/home/seurer/llvm/llvm-test/include -gmlt -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3-UNDEBUG -fno-exceptions -fno-rtti -o CMakeFiles/clangStaticAnalyzerCore.dir/HTMLDiagnostics.cpp.o -c /home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp /home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp:388:11: error: enumeration value 'Note' not handled in switch [-Werror,-Wswitch] switch (P.getKind()) { ^ 1 error generated. -- -Bill Seurer ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [PATCH] D25326: [StaticAnalyser] Don't merge different returns in ExplodedGraph
On 10/07/16 08:39, Daniel Marjamäki via cfe-commits wrote: danielmarjamaki removed rL LLVM as the repository for this revision. danielmarjamaki updated this revision to Diff 73926. danielmarjamaki added a comment. Refactoring. https://reviews.llvm.org/D25326 Files: include/clang/Analysis/ProgramPoint.h include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h lib/StaticAnalyzer/Core/CoreEngine.cpp lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/inlining/InlineObjCClassMethod.m test/Analysis/unreachable-code-path.c ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits The changes in CoreEngine.cpp cause issues with the sanitizer buildbots which compile with -Werror [ 80%] Building CXX object tools/clang/lib/StaticAnalyzer/Core/CMakeFiles/clangStaticAnalyzerCore.dir/CoreEngine.cpp.o cd /home/seurer/llvm/build/llvm-test/tools/clang/lib/StaticAnalyzer/Core && /home/seurer/llvm/build/llvm-test2/bin/clang++ -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_OBJC_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/seurer/llvm/build/llvm-test/tools/clang/lib/StaticAnalyzer/Core -I/home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core -I/home/seurer/llvm/llvm-test/tools/clang/include -I/home/seurer/llvm/build/llvm-test/tools/clang/include -I/home/seurer/llvm/build/llvm-test/include -I/home/seurer/llvm/llvm-test/include -gmlt -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror -Werror=date-time -std=c++11 -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3-UNDEBUG -fno-exceptions -fno-rtti -o CMakeFiles/clangStaticAnalyzerCore.dir/CoreEngine.cpp.o -c /home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp /home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:316:16: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses] if (RS = dyn_cast(LastStmt->getStmt())) { ~~~^~~ /home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:316:16: note: place parentheses around the assignment to silence this warning if (RS = dyn_cast(LastStmt->getStmt())) { ^ ( ) /home/seurer/llvm/llvm-test/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:316:16: note: use '==' to turn this assignment into an equality comparison if (RS = dyn_cast(LastStmt->getStmt())) { ^ == 1 error generated. -- -Bill Seurer -- -Bill Seurer ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r259622 - Fix miscompile and rejects-valids when disambiguating after an ambiguous
On 02/03/16 11:30, Renato Golin via cfe-commits wrote: On 3 February 2016 at 02:58, Richard Smith via cfe-commitswrote: Author: rsmith Date: Tue Feb 2 20:58:20 2016 New Revision: 259622 URL: http://llvm.org/viewvc/llvm-project?rev=259622=rev Log: Fix miscompile and rejects-valids when disambiguating after an ambiguous C-style-cast to function/array type or parenthesized function-style cast/array indexing. Hi Richard, After bisecting, I found that your commit is the responsible for this test-suite failure on AArch64: 1. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:181:45: current parser token ';' 2. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:165:1: parsing function body 'image_continue' 3. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:165:1: in compound statement ('{}') 4. /external/buildbot/clang-native-arm-lnt/test/test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c:181:5: in compound statement ('{}') http://lab.llvm.org:8011/builders/clang-cmake-aarch64-full/builds/1330 http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/16211 http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/4487 Can you have a look, please? cheers, --renato ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits This causes a similar failure on powerpc64 (both big and little endian). Note that this was found during the running of the lnt tests. /home/seurer/llvm/install/llvm-test3/bin/clang -DNOMEMOPT -DGS_LIB_DEFAULT=\"/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs:/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/fonts\" -DNOPRIVATE -I/home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs -I/home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs -I/home/seurer/llvm-test-suite/include -I../../../../include -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -DNDEBUG -Wno-implicit-function-declaration -O3 -ffp-contract=off -fomit-frame-pointer -c /home/seurer/llvm-test-suite/MultiSource/Benchmarks/MallocBench/gs/zpaint.c -o Output/zpaint.llvm.o TEST /home/seurer/llvm/install/llvm-test3/bin/clang FAILED: process terminated by signal (exit status 254)! error: command failed while generating /home/seurer/sandbox/test-2016-02-03_18-03-09/MultiSource/Benchmarks/MallocBench/gs/Output/zpaint.llvm.o.compile --- clang-3.9: /home/seurer/llvm/llvm-test3/tools/clang/include/clang/AST/Type.h:589: const clang::ExtQualsTypeCommonBase* clang::QualType::getCommonPtr() const: Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' failed. 0 clang-3.9 0x11975ad4 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 116 1 clang-3.9 0x11975f30 2 clang-3.9 0x11972dfc llvm::sys::RunSignalHandlers() + 124 3 clang-3.9 0x119730e0 40x10040478 __kernel_sigtramp_rt64 + 0 5 libc.so.6 0x104d0a88 gsignal + 72 6 libc.so.6 0x104d693c abort + 620 7 libc.so.6 0x104c65b4 8 libc.so.6 0x104c66a4 __assert_fail + 100 9 clang-3.9 0x12811dec clang::Sema::BuildUnaryOp(clang::Scope*, clang::SourceLocation, clang::UnaryOperatorKind, clang::Expr*) + 236 10 clang-3.9 0x12812214 clang::Sema::ActOnUnaryOp(clang::Scope*, clang::SourceLocation, clang::tok::TokenKind, clang::Expr*) + 68 11 clang-3.9 0x124a6664 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) + 5188 12 clang-3.9 0x124a779c clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) + 44 13 clang-3.9 0x124ac928 clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool, bool, clang::OpaquePtr&, clang::SourceLocation&) + 2376 14 clang-3.9 0x124a5b68 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) + 2376 15 clang-3.9 0x124a779c clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) + 44 16 clang-3.9 0x124a7888 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 72 17 clang-3.9 0x1247d144 clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) + 756 18 clang-3.9 0x12489fa0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 1472 19 clang-3.9 0x1248c978 clang::Parser::ParseSimpleDeclaration(unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*) + 536 20 clang-3.9 0x1248ce20
r253706 - Fix test case function name checks
Author: seurer Date: Fri Nov 20 14:47:34 2015 New Revision: 253706 URL: http://llvm.org/viewvc/llvm-project?rev=253706=rev Log: Fix test case function name checks This is similar to the earlier fix I did, r253702, expect that here it is function names that are being searched for. If the function name matches part of the directory name it can cause an apparent test case failure. Modified: cfe/trunk/test/CodeGen/captured-statements.c Modified: cfe/trunk/test/CodeGen/captured-statements.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/captured-statements.c?rev=253706=253705=253706=diff == --- cfe/trunk/test/CodeGen/captured-statements.c (original) +++ cfe/trunk/test/CodeGen/captured-statements.c Fri Nov 20 14:47:34 2015 @@ -21,7 +21,7 @@ void test1() { // CHECK-1: %struct.anon = type { i32* } // CHECK-1: {{.+}} global float 3.0 // - // CHECK-1: test1 + // CHECK-1: @test1( // CHECK-1: alloca %struct.anon // CHECK-1: getelementptr inbounds %struct.anon, %struct.anon* // CHECK-1: store i32* %i @@ -43,7 +43,7 @@ void test2(int x) { for (i = 0; i < x; i++) foo(); } - // CHECK-2: test2 + // CHECK-2: @test2( // CHECK-2-NOT: %i // CHECK-2: call void @[[HelperName:__captured_stmt[\.0-9]+]] } @@ -60,7 +60,7 @@ void test3(int size) { { arr[2] = vla_arr[size - 1]; } - // CHECK-3: test3 + // CHECK-3: @test3( // CHECK-3: alloca [5 x i32] // CHECK-3: call void @__captured_stmt } ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits