r295935 - [CodeGen] Don't reemit expressions for pass_object_size params.

2017-02-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 22 23:59:56 2017 New Revision: 295935 URL: http://llvm.org/viewvc/llvm-project?rev=295935=rev Log: [CodeGen] Don't reemit expressions for pass_object_size params. This fixes an assertion failure in cases where we had expression statements that declared variables nested

r295934 - [c-index-test] For the 'core' invocation, avoid running it under a new thread.

2017-02-22 Thread Argyrios Kyrtzidis via cfe-commits
Author: akirtzidis Date: Wed Feb 22 23:51:47 2017 New Revision: 295934 URL: http://llvm.org/viewvc/llvm-project?rev=295934=rev Log: [c-index-test] For the 'core' invocation, avoid running it under a new thread. It's unnecessary. Modified: cfe/trunk/tools/c-index-test/c-index-test.c

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-22 Thread Vlad Tsyrklevich via Phabricator via cfe-commits
vlad.tsyrklevich updated this revision to Diff 89467. vlad.tsyrklevich added a comment. @NoQ I've tried to address all the issues you mentioned in this change. Let me know if the expanded documentation doesn't address what you were looking for. https://reviews.llvm.org/D28445 Files:

Re: r295473 - [OpenMP] Remove barriers at cancel and cancellation point

2017-02-22 Thread Alexey Bataev via cfe-commits
Yes, approved Best regards, Alexey Bataev > 23 февр. 2017 г., в 1:00, Hans Wennborg написал(а): > > Alexey: ping? > >> On Tue, Feb 21, 2017 at 11:07 AM, Hans Wennborg wrote: >> I'm Ok with it if Alexey approves. >> >> On Fri, Feb 17, 2017 at 10:52 AM,

[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2017-02-22 Thread Ben Harper via Phabricator via cfe-commits
bmharper updated this revision to Diff 89463. bmharper added a comment. Fixed two small issues raised by @daphnediane https://reviews.llvm.org/D21279 Files: lib/Format/WhitespaceManager.cpp lib/Format/WhitespaceManager.h unittests/Format/FormatTest.cpp Index:

r295931 - [ODRHash] Handle types in ODR hashing.

2017-02-22 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 22 21:25:57 2017 New Revision: 295931 URL: http://llvm.org/viewvc/llvm-project?rev=295931=rev Log: [ODRHash] Handle types in ODR hashing. Fields will now have their types added to the hash, allowing for detection of mismatched field types. This detection allows the

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-22 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 89460. xiangzhai added a comment. Hi Anna, Thanks for your suggest! Firstly I uploaded Glib-MallocChecker-single-size-value.patch for code review, if submitted to UPSTREAM, then upload another one, correct? Regards, Leslie Zhai Repository: rL LLVM

[PATCH] D30285: [ubsan] Don't check alignment if the alignment is 1

2017-02-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. If a pointer is 1-byte aligned, there's no use in checking its alignment. Somewhat surprisingly, ubsan can spend a significant amount of time doing just that! This loosely depends on https://reviews.llvm.org/D30283. Testing: check-clang, check-ubsan, and a stage2

r295921 - Fix tracking of whether the previous template instantiation stack matches the current one.

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 20:09:03 2017 New Revision: 295921 URL: http://llvm.org/viewvc/llvm-project?rev=295921=rev Log: Fix tracking of whether the previous template instantiation stack matches the current one. Rather than attempting to compare whether the previous and current top of

[PATCH] D30131: [profiling] PR31992: Don't skip interesting non-base constructors

2017-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. One point to note, when we are displaying coverage for constructors that have both the base and complete versions instrumented, e.g.: class Foo { public: Foo() { } };

[libclc] r295920 - math: Add native_tan as wrapper to tan

2017-02-22 Thread Aaron Watry via cfe-commits
Author: awatry Date: Wed Feb 22 19:46:57 2017 New Revision: 295920 URL: http://llvm.org/viewvc/llvm-project?rev=295920=rev Log: math: Add native_tan as wrapper to tan Trivially define native_tan as a redirect to tan. If there are any targets with a native implementation, we can deal with it

r295919 - Rename ActiveTemplateInstantiation to CodeSynthesisContext in preparation for

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 19:43:54 2017 New Revision: 295919 URL: http://llvm.org/viewvc/llvm-project?rev=295919=rev Log: Rename ActiveTemplateInstantiation to CodeSynthesisContext in preparation for using it for other kinds of context (where we currently produce context notes in a highly

[PATCH] D30283: [ubsan] Reduce alignment checking of C++ object pointers

2017-02-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. This patch teaches ubsan to insert an alignment check for the 'this' pointer at the start of each method/lambda. This allows clang to emit significantly fewer alignment checks overall, because if 'this' is aligned, so are its fields. This is essentially the same thing

r295918 - Rename a helper function, NFC.

2017-02-22 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Feb 22 19:22:38 2017 New Revision: 295918 URL: http://llvm.org/viewvc/llvm-project?rev=295918=rev Log: Rename a helper function, NFC. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp cfe/trunk/lib/CodeGen/CGExprCXX.cpp cfe/trunk/lib/CodeGen/CodeGenFunction.h

r295911 - [ODRHash] Add IdentiferInfo and FieldDecl support.

2017-02-22 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 22 18:23:01 2017 New Revision: 295911 URL: http://llvm.org/viewvc/llvm-project?rev=295911=rev Log: [ODRHash] Add IdentiferInfo and FieldDecl support. IdentifierInfo is hashed based on the stored string. FieldDecl versus other Decl is now detected, as well as

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-22 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Ping, is the argument in favor of making the change in my last comment satisfactory? https://reviews.llvm.org/D29369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r295903 - [ObjC][Modules] Don't perform property lookup in hidden class extensions

2017-02-22 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Feb 22 17:18:49 2017 New Revision: 295903 URL: http://llvm.org/viewvc/llvm-project?rev=295903=rev Log: [ObjC][Modules] Don't perform property lookup in hidden class extensions rdar://30603803 Modified: cfe/trunk/lib/AST/DeclObjC.cpp

r295894 - [CodeGen] Add param info for ctors with ABI args.

2017-02-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 22 16:38:25 2017 New Revision: 295894 URL: http://llvm.org/viewvc/llvm-project?rev=295894=rev Log: [CodeGen] Add param info for ctors with ABI args. This fixes a few assertion failures. Please see the added test case. Added:

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-22 Thread Samuel Benzaquen via Phabricator via cfe-commits
sbenza added inline comments. Comment at: lib/Tooling/RefactoringCallbacks.cpp:213 +llvm::errs() << "Node " << Element.Value + << " used in replacement template not bound in Matcher \n"; +llvm_unreachable("Unbound node in replacement

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-22 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Could you please split the patch into two - one with the previously reviewed support for functions that take a single size value and another patch that models the two size arguments (num and size). It's easier to review patches if they do not grow new functionality.

r295890 - [ODRHash] static_cast and Stmt hashing.

2017-02-22 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 22 16:22:42 2017 New Revision: 295890 URL: http://llvm.org/viewvc/llvm-project?rev=295890=rev Log: [ODRHash] static_cast and Stmt hashing. Add support for static_cast in classes. Add pointer-independent profiling for Stmt's, sharing most of the logic with

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-22 Thread Julian Bangert via Phabricator via cfe-commits
jbangert accepted this revision. jbangert added a comment. Thanks, added tests for parser failures. https://reviews.llvm.org/D29621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-22 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 89420. jbangert marked an inline comment as done. jbangert added a comment. - additional tests https://reviews.llvm.org/D29621 Files: include/clang/Tooling/RefactoringCallbacks.h lib/Tooling/RefactoringCallbacks.cpp

r295886 - PR32034: Evaluate _Atomic(T) in-place when T is a class or array type.

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 16:09:50 2017 New Revision: 295886 URL: http://llvm.org/viewvc/llvm-project?rev=295886=rev Log: PR32034: Evaluate _Atomic(T) in-place when T is a class or array type. This is necessary in order for the evaluation of an _Atomic initializer for those types to have

Re: r295473 - [OpenMP] Remove barriers at cancel and cancellation point

2017-02-22 Thread Hans Wennborg via cfe-commits
Alexey: ping? On Tue, Feb 21, 2017 at 11:07 AM, Hans Wennborg wrote: > I'm Ok with it if Alexey approves. > > On Fri, Feb 17, 2017 at 10:52 AM, Hahnfeld, Jonas > wrote: >> Hi Hans, Alexey, >> >> can we merge this commit and r295474 for the 4.0

r295874 - AMDGPU: Add fmed3 half builtin

2017-02-22 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Wed Feb 22 14:55:59 2017 New Revision: 295874 URL: http://llvm.org/viewvc/llvm-project?rev=295874=rev Log: AMDGPU: Add fmed3 half builtin Added: cfe/trunk/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl cfe/trunk/test/SemaOpenCL/builtins-amdgcn-error-gfx9.cl Modified:

[PATCH] D30241: AMDGPU: Add fmed3 half builtin

2017-02-22 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. r295874 https://reviews.llvm.org/D30241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30035: Add const to function parameters

2017-02-22 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya added a comment. Thank you for the feedback. This was supposed to be first out of two patches. I have posted the next patch here: https://reviews.llvm.org/D30268 which aims to remove copy of __src array each time a number is parsed. I can abandon this patch if we don't need to

[PATCH] D30268: Avoid copy of __atoms when char_type is char

2017-02-22 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya created this revision. The function __num_get<_CharT>::__stage2_int_prep makes unnecessary copy of __src into __atoms when char_type is char. This can be avoided by creating a switch on type and just returning __src when char_type is char. Running a synthetic benchmark shows the

r295872 - stop using associative comdats for SEH filter functions

2017-02-22 Thread Bob Haarman via cfe-commits
Author: inglorion Date: Wed Feb 22 14:29:39 2017 New Revision: 295872 URL: http://llvm.org/viewvc/llvm-project?rev=295872=rev Log: stop using associative comdats for SEH filter functions Summary: We implement structured exception handling (SEH) by generating filter functions for functions that

r295870 - [CodeGen] Note where we add ABI-specific args in ctors. NFC.

2017-02-22 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Feb 22 14:28:02 2017 New Revision: 295870 URL: http://llvm.org/viewvc/llvm-project?rev=295870=rev Log: [CodeGen] Note where we add ABI-specific args in ctors. NFC. Meta: The ultimate goal is to teach ExtParameterInfo about pass_object_size attributes. This is necessary for

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2017-02-22 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: test/CodeGenObjC/availability-check.m:16 + // CHECK: br i1 true + if (__builtin_available(ios 10, *)) +; arphaman wrote: > Shouldn't this be `br i1 false`, since we are building for macOS so we have > no

r295866 - Improve support for 'decltype(auto)' in template template parameter matching.

2017-02-22 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Feb 22 14:01:55 2017 New Revision: 295866 URL: http://llvm.org/viewvc/llvm-project?rev=295866=rev Log: Improve support for 'decltype(auto)' in template template parameter matching. A 'decltype(auto)' parameter can match any other kind of non-type template parameter, so

[PATCH] D30238: [Driver] Enable SafeStack for Fuchsia targets

2017-02-22 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D30238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30238: [Driver] Enable SafeStack for Fuchsia targets

2017-02-22 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr updated this revision to Diff 89393. mcgrathr added a comment. Added test case. Repository: rL LLVM https://reviews.llvm.org/D30238 Files: lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h test/Driver/fuchsia.c Index: test/Driver/fuchsia.c

[PATCH] D30239: enable -flto=thin, -flto-jobs=, and -fthinlto-index= in clang-cl

2017-02-22 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D30239#683697, @inglorion wrote: > @mehdi_amini: > > > Is clang-cl using lld as default? How is the switch done? Ideally we should > > have a nice error message from the driver if -flto is used without lld. > > I believe we use link.exe by

Re: [PATCH] D13330: Implement __attribute__((unique_instantiation))

2017-02-22 Thread David Blaikie via cfe-commits
On Tue, Feb 14, 2017 at 4:21 PM Mehdi AMINI via Phabricator via cfe-commits wrote: > mehdi_amini added a comment. > > In https://reviews.llvm.org/D13330#582607, @rsmith wrote: > > > I think this attribute is poorly named. Explicit instantiation > definitions are

[PATCH] D30248: [libclang] Fix crash in member access code completion with implicit base

2017-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It seems that unresolved member expressions have other lookup issues. For example, this will crash when code-completing as well: struct Foo { void foo() const; static void foo(bool); }; struct Bar: Foo { void foo(bool param) { this->Foo::foo(/*CC

Re: [PATCH] D30035: Add const to function parameters

2017-02-22 Thread David Blaikie via cfe-commits
Adding const to pointed/referenced types doesn't usually help the compiler, since they don't guarantee that the underlying object is const (nor that any use can't involve const_casting away the constness and mutating the value anyway). On Fri, Feb 17, 2017 at 2:34 PM Aditya Kumar via Phabricator

[PATCH] D30239: enable -flto=thin, -flto-jobs=, and -fthinlto-index= in clang-cl

2017-02-22 Thread Bob Haarman via Phabricator via cfe-commits
inglorion added a comment. @mehdi_amini: > Is clang-cl using lld as default? How is the switch done? Ideally we should > have a nice error message from the driver if -flto is used without lld. I believe we use link.exe by default. You can use lld by passing -fuse-ld=lld to the compiler. I

[PATCH] D27827: [ObjC] CodeGen support for @available on macOS

2017-02-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: test/CodeGenObjC/availability-check.m:16 + // CHECK: br i1 true + if (__builtin_available(ios 10, *)) +; Shouldn't this be `br i1 false`, since we are building for macOS so we have no iOS support at all?

Re: r295843 - [OpenCL] r600 needs OpenCL kernel calling convention

2017-02-22 Thread Hans Wennborg via cfe-commits
I'm OK with it if either Matt or Anastasia agrees. Thanks, Hans On Wed, Feb 22, 2017 at 7:20 AM, Jan Vesely wrote: > Hi Hans, > > I'd like this commit to make it to 4.0. I'm not sure if it falls under > OpenCL or AMDGPU so I've added both Matt and Anastasia to cc. > >

[PATCH] D25604: Add support for Mageia Linux

2017-02-22 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev abandoned this revision. v.g.vassilev added a comment. Thanks for following this up. I will close it. https://reviews.llvm.org/D25604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30241: AMDGPU: Add fmed3 half builtin

2017-02-22 Thread Konstantin Zhuravlyov via Phabricator via cfe-commits
kzhuravl accepted this revision. kzhuravl added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D30241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 89366. sammccall added a comment. git-clang-format https://reviews.llvm.org/D30210 Files: include-fixer/InMemorySymbolIndex.cpp include-fixer/InMemorySymbolIndex.h include-fixer/IncludeFixer.cpp include-fixer/SymbolIndex.h

[PATCH] D25604: Add support for Mageia Linux

2017-02-22 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. I just tested this on Mageia and this patch is superseded by now (it was originally written in 2013). The latest clang release is already able to correctly handle Mageia. (Also there is anyway comma missing at the end of each line) https://reviews.llvm.org/D25604

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 89365. sammccall added a comment. Switch from SymbolInfo::WithSignals as a typedef for std::pair, to a struct SymbolAndSignals, to have clearer semantics. https://reviews.llvm.org/D30210 Files: include-fixer/InMemorySymbolIndex.cpp

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 89360. sammccall added a comment. Changes based on offline discussion: - mutable SignalInfo data split into SignalInfo::Signals - yaml serialized data is SignalInfo::WithSignals, which is currently a pair -

Re: r295843 - [OpenCL] r600 needs OpenCL kernel calling convention

2017-02-22 Thread Jan Vesely via cfe-commits
Hi Hans, I'd like this commit to make it to 4.0. I'm not sure if it falls under OpenCL or AMDGPU so I've added both Matt and Anastasia to cc. thank you, Jan On Wed, 2017-02-22 at 15:01 +, Jan Vesely via cfe-commits wrote: > Author: jvesely > Date: Wed Feb 22 09:01:42 2017 > New Revision:

r295843 - [OpenCL] r600 needs OpenCL kernel calling convention

2017-02-22 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Feb 22 09:01:42 2017 New Revision: 295843 URL: http://llvm.org/viewvc/llvm-project?rev=295843=rev Log: [OpenCL] r600 needs OpenCL kernel calling convention Differential Revision: https://reviews.llvm.org/D30236 Modified: cfe/trunk/lib/Sema/SemaType.cpp

r295839 - Remove superfluous initializer.

2017-02-22 Thread Yaron Keren via cfe-commits
Author: yrnkrn Date: Wed Feb 22 08:32:39 2017 New Revision: 295839 URL: http://llvm.org/viewvc/llvm-project?rev=295839=rev Log: Remove superfluous initializer. The following fully-covered switch either sets value to External or exits the function. Modified:

r295829 - Fix 'control reaches end of non-void function' warning

2017-02-22 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Feb 22 07:21:24 2017 New Revision: 295829 URL: http://llvm.org/viewvc/llvm-project?rev=295829=rev Log: Fix 'control reaches end of non-void function' warning Modified: cfe/trunk/lib/Serialization/ASTReader.cpp Modified: cfe/trunk/lib/Serialization/ASTReader.cpp

r295828 - Fix -Wunused-private-field warning by removing unused ODRHash reference field from ODRDeclVisitor

2017-02-22 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Wed Feb 22 07:19:24 2017 New Revision: 295828 URL: http://llvm.org/viewvc/llvm-project?rev=295828=rev Log: Fix -Wunused-private-field warning by removing unused ODRHash reference field from ODRDeclVisitor Modified: cfe/trunk/lib/AST/ODRHash.cpp Modified:

[PATCH][scan-build]Add -target option when clang is invoked to check syntax

2017-02-22 Thread Kazuhiro Yabe via cfe-commits
Dear all, This patch adds the '-target' option to the clang option to invoke to check the syntax when scan-build is called with the --analyzer-target option. I'm using scan-build in cross compile project. (target: armv7-a) Even when cross compiling, scan-build invokes clang with -triple (HOST

[PATCH] D30248: [libclang] Fix crash in member access code completion with implicit base

2017-02-22 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv created this revision. If there is an unresolved member access AST node, and the base is implicit, do not access/use it for generating candidate overloads for code completion results (because the base is a nullptr). Fixes PR31093. https://reviews.llvm.org/D30248 Files:

r295820 - [ODRHash] Avoid dereferencing end() of a SmallVector.

2017-02-22 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Wed Feb 22 04:19:45 2017 New Revision: 295820 URL: http://llvm.org/viewvc/llvm-project?rev=295820=rev Log: [ODRHash] Avoid dereferencing end() of a SmallVector. Found by MSAN. Modified: cfe/trunk/lib/Serialization/ASTReader.cpp Modified:

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall planned changes to this revision. sammccall added a comment. OK, some changes to come here: - klimek thinks using a set as a pseudo-map with `mutable` is evil, which is a fair point - the current `SymbolReporter` interface doesn't provide enough information to deduplicate

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include-fixer/find-all-symbols/FindAllSymbols.cpp:251 + } else { +assert(false && "Must match a NamedDecl!"); + } You can use llvm_unreachable instead. Or do you actually want to fall through in release mode?

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for the review, still learning the style :) Comment at: include-fixer/find-all-symbols/FindAllSymbols.cpp:250 + } else { +assert(!"Must match a NamedDecl!"); + } hokein wrote: > Is the preceding `!` intended? This does

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 89337. sammccall marked 7 inline comments as done. sammccall added a comment. Address review comments. https://reviews.llvm.org/D30210 Files: include-fixer/IncludeFixer.cpp include-fixer/SymbolIndexManager.cpp

[clang-tools-extra] r295818 - Completion related fixes for clang-include-fixer.el.

2017-02-22 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Wed Feb 22 03:21:22 2017 New Revision: 295818 URL: http://llvm.org/viewvc/llvm-project?rev=295818=rev Log: Completion related fixes for clang-include-fixer.el. 1. Quitting inside a process sentinel is not allowed, but the sentinel invokes completion, where the user is free

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-22 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 89333. xiangzhai added a comment. Fixed the confused State->getSVal(CE->getArg(1), C.getLocationContext()); with CE->getArg(1) issue. Repository: rL LLVM https://reviews.llvm.org/D28348 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp

[PATCH] D30210: [include-fixer] Add usage count to find-all-symbols.

2017-02-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the contributions! Comment at: include-fixer/find-all-symbols/FindAllSymbols.cpp:244 - const auto *ND = Result.Nodes.getNodeAs("decl"); - assert(ND && "Matched declaration must be a NamedDecl!"); + auto report = ::reportSymbol; + const

[PATCH] D28348: [analyzer] Taught the analyzer about Glib API to check Memory-leak

2017-02-22 Thread Leslie Zhai via Phabricator via cfe-commits
xiangzhai updated this revision to Diff 89331. xiangzhai added a comment. Hi Anna, I added **svalBinMulOp** to take BO_Mul evalBinOp for g_malloc_n's two arguments: CE->getArg(0) and CE->getArg(1), so it does **NOT** need to change **MallocMemAux** any more, but just use it in this way:

[clang-tools-extra] r295814 - Adds a hook clang-include-fixer-add-include-hook that is invoked with the path and type of the added include.

2017-02-22 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Wed Feb 22 02:26:04 2017 New Revision: 295814 URL: http://llvm.org/viewvc/llvm-project?rev=295814=rev Log: Adds a hook clang-include-fixer-add-include-hook that is invoked with the path and type of the added include. This patch also adds a new function