Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
eugenis closed this revision. eugenis added a comment. r247465, thanks for the review! Repository: rL LLVM http://reviews.llvm.org/D12087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

Re: [PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

2015-09-11 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:244 @@ +243,3 @@ + const ProgramPointTag *Tag = nullptr) { +return generateSink(State, /*Pred=*/nullptr, + (Tag

Re: [PATCH] D12406: [Analyzer] Add -analyzer-config option for function size the inliner considers as large

2015-09-11 Thread Ted Kremenek via cfe-commits
krememek added a comment. LGTM as well. Thanks Sean. Repository: rL LLVM http://reviews.llvm.org/D12406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: recordDecl() AST matcher

2015-09-11 Thread Aaron Ballman via cfe-commits
On Fri, Sep 11, 2015 at 4:30 PM, Richard Smith wrote: > I don't think CXXRecordDecl is an anachronism, so much as an implementation > detail; it makes sense to use a smaller class when in C mode, as we don't > need most of the features and complexity that CXXRecordDecl brings with it. > But... as

r247466 - [analyzer] Improve behavior if Clang not found.

2015-09-11 Thread Anton Yartsev via cfe-commits
Author: ayartsev Date: Fri Sep 11 15:41:09 2015 New Revision: 247466 URL: http://llvm.org/viewvc/llvm-project?rev=247466&view=rev Log: [analyzer] Improve behavior if Clang not found. - Eliminate 'No such file or directory at scan-build line ...' error if '$RealBin/bin/clang' or '$RealBin/clang'

r247467 - [CMake] [Darwin] Add support for building bootstrap builds with -flto

2015-09-11 Thread Chris Bieneman via cfe-commits
Author: cbieneman Date: Fri Sep 11 15:42:57 2015 New Revision: 247467 URL: http://llvm.org/viewvc/llvm-project?rev=247467&view=rev Log: [CMake] [Darwin] Add support for building bootstrap builds with -flto When building with LTO the bootstrap builds need to depend on libLTO, llvm-ar, and llvm-ra

r247468 - [tooling] In CompileCommand, Expose the 'file' that was associated with the command.

2015-09-11 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Fri Sep 11 15:43:05 2015 New Revision: 247468 URL: http://llvm.org/viewvc/llvm-project?rev=247468&view=rev Log: [tooling] In CompileCommand, Expose the 'file' that was associated with the command. Modified: cfe/trunk/include/clang-c/CXCompilationDatabase.h cfe/tr

Re: PATCH: Expose the 'file' that is associated with a compile database command

2015-09-11 Thread Argyrios Kyrtzidis via cfe-commits
In r247468, thanks for reviewing! > On Sep 11, 2015, at 10:24 AM, Manuel Klimek via cfe-commits > wrote: > > Ok, looked at the original patch again, and if we're fixing the > FixedCompilationDatabase to only insert the file when it actually produces a > CompileCommand it seems to be fine. >

Re: r246877 - Increase accuracy of __builtin_object_size.

2015-09-11 Thread George Burgess IV via cfe-commits
> It might be reasonable for __builtin_object_size(..., 2) to give up if [...] That sounds like the best overall solution to me, as well. Working on a fix now. On Fri, Sep 11, 2015 at 1:22 PM, Richard Smith wrote: > On Fri, Sep 11, 2015 at 12:15 PM, Mikhail Zolotukhin via cfe-commits < > cfe-co

Re: [PATCH] D9040: [analyzer] Make realloc(ptr, 0) handling equivalent to malloc(0).

2015-09-11 Thread Антон Ярцев via cfe-commits
ayartsev updated this revision to Diff 34583. ayartsev added a comment. Updated the patch after r246978. Please review! http://reviews.llvm.org/D9040 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/malloc.c Index: test/Analysis/malloc.c ==

[PATCH] D12817: [CMake] Add cache scripts for Apple-style clang builds.

2015-09-11 Thread Chris Bieneman via cfe-commits
beanz created this revision. beanz added reviewers: chandlerc, echristo. beanz added a subscriber: cfe-commits. These CMake cache scripts are my first pass at replicating Apple's packaging logic from autoconf. They can be used on any Darwin machine to approximate an Apple Clang build. The inclu

[PATCH] D12818: [Static Analyzer] Relaxing a caching out related assert.

2015-09-11 Thread Gábor Horváth via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: zaks.anna, dcoughlin, jordan_rose, krememek. xazax.hun added a subscriber: cfe-commits. During the development of the nullability checkers I hit this assert several times. However it is very hard to reproduce it with a minimal example, a

r247472 - Simplify logic introduced in r247464.

2015-09-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Fri Sep 11 15:55:29 2015 New Revision: 247472 URL: http://llvm.org/viewvc/llvm-project?rev=247472&view=rev Log: Simplify logic introduced in r247464. Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp URL: http://llvm.org/viewv

Re: r247464 - [MS ABI] Select an inheritance model in template arguments

2015-09-11 Thread David Majnemer via cfe-commits
On Fri, Sep 11, 2015 at 1:23 PM, Richard Smith wrote: > On Fri, Sep 11, 2015 at 1:18 PM, David Majnemer via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: majnemer >> Date: Fri Sep 11 15:18:09 2015 >> New Revision: 247464 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=247464&

r247473 - Specify target triple in alwaysinline tests.

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Sep 11 16:10:12 2015 New Revision: 247473 URL: http://llvm.org/viewvc/llvm-project?rev=247473&view=rev Log: Specify target triple in alwaysinline tests. This should fix the tests on Windows (failing due to mangling differencies). Modified: cfe/trunk/test/CodeGen/alw

r247474 - [Shave]: pass -isystem dirs and "-Wa," args to moviAsm

2015-09-11 Thread Douglas Katzman via cfe-commits
Author: dougk Date: Fri Sep 11 16:13:46 2015 New Revision: 247474 URL: http://llvm.org/viewvc/llvm-project?rev=247474&view=rev Log: [Shave]: pass -isystem dirs and "-Wa," args to moviAsm Modified: cfe/trunk/lib/Driver/Tools.cpp cfe/trunk/test/Driver/shave-toolchain.c Modified: cfe/trunk/

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-11 Thread Zhengkai Wu via cfe-commits
zhengkai updated the summary for this revision. zhengkai updated this revision to Diff 34588. http://reviews.llvm.org/D12379 Files: include/clang/Basic/SourceManager.h lib/Basic/SourceManager.cpp lib/Frontend/DiagnosticRenderer.cpp test/Index/fix-its.m test/Misc/caret-diags-macros.c t

r247476 - [Static Analyzer] Properly cash the configuration option for lambda support.

2015-09-11 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Fri Sep 11 16:19:39 2015 New Revision: 247476 URL: http://llvm.org/viewvc/llvm-project?rev=247476&view=rev Log: [Static Analyzer] Properly cash the configuration option for lambda support. Modified: cfe/trunk/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp Modified: cfe/trun

r247477 - Let selector-expr-lvalue.mm actually test something.

2015-09-11 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Sep 11 16:24:40 2015 New Revision: 247477 URL: http://llvm.org/viewvc/llvm-project?rev=247477&view=rev Log: Let selector-expr-lvalue.mm actually test something. I accidentally introduced a bug locally, and noticed that none of the tests caught it. No longer! Modified:

r247482 - When comparing two block captures for layout, don't crash

2015-09-11 Thread John McCall via cfe-commits
Author: rjmccall Date: Fri Sep 11 17:00:51 2015 New Revision: 247482 URL: http://llvm.org/viewvc/llvm-project?rev=247482&view=rev Log: When comparing two block captures for layout, don't crash if they have the same alignment and one was 'this'. Fixes PR24780. Modified: cfe/trunk/lib/CodeGen/

Re: [PATCH] D12759: [clang-tidy] Add misc-sizeof-container check to find sizeof() uses on stlcontainers.

2015-09-11 Thread Alexander Kornienko via cfe-commits
Indeed. But this has been fixed before I could get to it. On Thu, Sep 10, 2015 at 10:47 PM, Aaron Ballman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > aaron.ballman added a comment. > > This appears to have broken one of the bots: > > http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/

[clang-tools-extra] r247485 - [clang-tidy] Fix minor issues in the testing script.

2015-09-11 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Sep 11 17:38:26 2015 New Revision: 247485 URL: http://llvm.org/viewvc/llvm-project?rev=247485&view=rev Log: [clang-tidy] Fix minor issues in the testing script. Modified: clang-tools-extra/trunk/test/clang-tidy/check_clang_tidy.py Modified: clang-tools-extra/trunk/te

r247486 - [modules] When picking one of two template declarations as a lookup result,

2015-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 11 17:39:35 2015 New Revision: 247486 URL: http://llvm.org/viewvc/llvm-project?rev=247486&view=rev Log: [modules] When picking one of two template declarations as a lookup result, it's not sufficient to prefer the declaration with more default arguments, or the one tha

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2015-09-11 Thread Dmitri Gribenko via cfe-commits
gribozavr added inline comments. Comment at: tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td:524 @@ +523,3 @@ +def MPIChecker : Checker<"MPI-Checker">, + HelpText<"Checks MPI code written in C">, + DescFile<"MPIChecker.cpp">; Does it only works with C code,

[clang-tools-extra] r247489 - [clang-tidy] misc-sizeof-container: whitelist std::bitset<>.

2015-09-11 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri Sep 11 17:54:44 2015 New Revision: 247489 URL: http://llvm.org/viewvc/llvm-project?rev=247489&view=rev Log: [clang-tidy] misc-sizeof-container: whitelist std::bitset<>. It's fine to use sizeof on std::bitset<>, since it doesn't have any external storage, everything's insi

r247488 - Add new test file missing from r247486.

2015-09-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 11 17:54:01 2015 New Revision: 247488 URL: http://llvm.org/viewvc/llvm-project?rev=247488&view=rev Log: Add new test file missing from r247486. Added: cfe/trunk/test/Modules/Inputs/template-default-args/d.h Added: cfe/trunk/test/Modules/Inputs/template-default-ar

Re: [PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

2015-09-11 Thread Devin Coughlin via cfe-commits
dcoughlin marked 3 inline comments as done. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:229 @@ -228,2 +228,3 @@ + /// checkers should use generateErrorNode() instead. ExplodedNode *generateSink(ProgramStateRef State = nullptr,

Re: [PATCH] D12780: [analyzer] Add generateErrorNode() APIs to CheckerContext

2015-09-11 Thread Anna Zaks via cfe-commits
zaks.anna added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:321 @@ +320,3 @@ +// sink, we assume that a client requesting a transition to a state that is +// the same as the predecessor state has made a mistake. We return t

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread H.J. Lu via cfe-commits
On Fri, Sep 11, 2015 at 1:31 PM, Evgeniy Stepanov via cfe-commits wrote: > eugenis closed this revision. > eugenis added a comment. > > r247465, thanks for the review! > On Fedora 22/x86-64, I got FAIL: Clang :: CodeGen/always_inline.c (3049 of 26132) TEST 'Clang :: CodeGen/

[PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-09-11 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added subscribers: cfe-commits, mzolotukhin. In C, a common idiom is: ``` struct Foo { int a; char cs[1] }; struct Foo *F = (struct Foo *)malloc(sizeof(Foo) + strlen(SomeString)); strcpy(F->cs,

Re: r246877 - Increase accuracy of __builtin_object_size.

2015-09-11 Thread George Burgess IV via cfe-commits
Proposed fix: http://reviews.llvm.org/D12821 On Fri, Sep 11, 2015 at 1:44 PM, George Burgess IV < george.burgess...@gmail.com> wrote: > > It might be reasonable for __builtin_object_size(..., 2) to give up if > [...] > > That sounds like the best overall solution to me, as well. Working on a > fi

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread Evgenii Stepanov via cfe-commits
Does it say that there is no entry basic block? I.e. the output apparently looks like define void @h() #1 { store void ()* @f1, void ()** @p, align 8 Could you confirm it? Never seen this behavior. I'm going to revert the change due to this and also one broken gdb test (something wrong with de

Re: [PATCH] D12821: Allow for C's "writing off the end" idiom in __builtin_object_size

2015-09-11 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:165 @@ -159,1 +164,3 @@ +/// Indicator of whether the most-derived object is an array. +bool MostDerivedIsArrayElement : 1; array -> array element. Comment at: lib/AST/E

r247491 - Revert "Specify target triple in alwaysinline tests."

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Sep 11 18:48:37 2015 New Revision: 247491 URL: http://llvm.org/viewvc/llvm-project?rev=247491&view=rev Log: Revert "Specify target triple in alwaysinline tests." Revert "Always_inline codegen rewrite." Breaks gdb & lldb tests. Breaks on Fedora 22 x86_64. Removed: cf

Re: [PATCH] D12381: [Static Analyzer] Merge the Objective-C Generics Checker into Dynamic Type Propagation checker.

2015-09-11 Thread Gábor Horváth via cfe-commits
xazax.hun updated this revision to Diff 34606. xazax.hun added a comment. - Rebased on the top of latest trunk (which contains patch #1 and patch #2 from my previous comments) http://reviews.llvm.org/D12381 Files: lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/Check

Re: [PATCH] D12251: Analyzer: Calculate field offset correctly

2015-09-11 Thread Ismail Pazarbasi via cfe-commits
ismailp added a comment. Ping! http://reviews.llvm.org/D12251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 34610. eugenis added a comment. Fixed the debug info problem. Repository: rL LLVM http://reviews.llvm.org/D12087 Files: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGClass.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CodeGenModule.cpp lib/CodeGen/Code

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
eugenis added inline comments. Comment at: lib/CodeGen/CodeGenModule.cpp:543 @@ +542,3 @@ + if (Fn->isUsedByMetadata()) +llvm::ValueAsMetadata::handleRAUW(Fn, StubFn); +} As the comment says. W/o this, the debug info for .alwaysinline instructions is attached

Re: [PATCH] D12684: [INSTALL.txt] Fix formatting - 80 character line

2015-09-11 Thread Vedant Kumar via cfe-commits
vsk added a subscriber: vsk. vsk accepted this revision. vsk added a reviewer: vsk. vsk added a comment. This revision is now accepted and ready to land. Thanks, LGTM. http://reviews.llvm.org/D12684 ___ cfe-commits mailing list cfe-commits@lists.llv

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread H.J. Lu via cfe-commits
On Fri, Sep 11, 2015 at 4:45 PM, Evgenii Stepanov wrote: > Does it say that there is no entry basic block? I.e. the output > apparently looks like > > define void @h() #1 { > store void ()* @f1, void ()** @p, align 8 > > Could you confirm it? Never seen this behavior. > > I'm going to revert the

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread Evgenii Stepanov via cfe-commits
Thanks. I just reproduced it on release w/o asserts build and fixed locally. The other problem is fixed as well, I'll try re-landing now. I'll keep an eye on the bot later today and will revert again if necessary. On Fri, Sep 11, 2015 at 6:02 PM, H.J. Lu wrote: > On Fri, Sep 11, 2015 at 4:45 PM,

r247494 - Always_inline codegen rewrite.

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Fri Sep 11 20:07:37 2015 New Revision: 247494 URL: http://llvm.org/viewvc/llvm-project?rev=247494&view=rev Log: Always_inline codegen rewrite. Current implementation may end up emitting an undefined reference for an "inline __attribute__((always_inline))" function by generat

Re: [PATCH] D12087: always_inline codegen rewrite

2015-09-11 Thread Evgeniy Stepanov via cfe-commits
eugenis added a comment. second attempt in r247494 Repository: rL LLVM http://reviews.llvm.org/D12087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D12686: Add support for GCC's '__auto_type' extension.

2015-09-11 Thread Vedant Kumar via cfe-commits
vsk added a subscriber: vsk. vsk added a comment. First off, welcome! And thanks for patch. This basically LGTM, but I have one small change I'd like to see (inline comment). Hm, the spec says "The sizeof operator shall not be applied to... an lvalue that designates a bit-field". Sounds like a

Re: [PATCH] D12712: Implementation and testing for poisoning vtable ptr in dtor.

2015-09-11 Thread Naomi Musgrave via cfe-commits
nmusgrave updated this revision to Diff 34614. nmusgrave marked 2 inline comments as done. nmusgrave added a comment. - Fixed testing callback emission order to account for vptr. http://reviews.llvm.org/D12712 Files: lib/CodeGen/CGClass.cpp test/CodeGenCXX/sanitize-dtor-derived-class.cpp

r247496 - clang/test/Driver/stackrealign.c REQUIRES clang-driver.

2015-09-11 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Fri Sep 11 20:29:35 2015 New Revision: 247496 URL: http://llvm.org/viewvc/llvm-project?rev=247496&view=rev Log: clang/test/Driver/stackrealign.c REQUIRES clang-driver. GCC driver, for example cygwin, both "-mstackrealign" "-mno-stackrealign" are passed. Modified: cfe/t

Re: [PATCH] D12686: Add support for GCC's '__auto_type' extension.

2015-09-11 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. Comment at: include/clang/AST/Type.h:1210 @@ +1209,3 @@ +/// Which keyword(s) were used to create an AutoType. +enum struct AutoTypeKeyword : unsigned char { + /// \brief auto Please use `enum class` here; we don't use `enum str

Re: [PATCH] D12712: Implementation and testing for poisoning vtable ptr in dtor.

2015-09-11 Thread Naomi Musgrave via cfe-commits
nmusgrave updated this revision to Diff 34617. nmusgrave added a comment. - Poison vtable in either complete or base dtor. http://reviews.llvm.org/D12712 Files: lib/CodeGen/CGClass.cpp test/CodeGenCXX/sanitize-dtor-derived-class.cpp test/CodeGenCXX/sanitize-dtor-vtable.cpp Index: test/Co

r247498 - Clean up trailing whitespace in the builtin headers

2015-09-11 Thread Sean Silva via cfe-commits
Author: silvas Date: Fri Sep 11 21:55:19 2015 New Revision: 247498 URL: http://llvm.org/viewvc/llvm-project?rev=247498&view=rev Log: Clean up trailing whitespace in the builtin headers Modified: cfe/trunk/lib/Headers/altivec.h cfe/trunk/lib/Headers/ammintrin.h cfe/trunk/lib/Headers/av

r247500 - [CodeGen] Remove wrapper-free always_inline functions from COMDATs

2015-09-11 Thread David Majnemer via cfe-commits
Author: majnemer Date: Sat Sep 12 01:37:42 2015 New Revision: 247500 URL: http://llvm.org/viewvc/llvm-project?rev=247500&view=rev Log: [CodeGen] Remove wrapper-free always_inline functions from COMDATs always_inline functions without a wrapper don't need to be in a COMDAT. Modified: cfe/trun

<    1   2