[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-05-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99522. ddcc added a comment. Herald added a subscriber: eraman. Rebase, avoid generating floating-point constraints if unsupported by constraint manager https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99521. ddcc added a comment. Fix typo in SymbolCast simplification https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D9#759125, @rsmith wrote: > Should I assume our "misplaced ellipsis" diagnostic requires that we > disambiguate the ill-formed ellipsis-after-declarator-id as a declarator in > some cases? If so, do we have tests for that

[PATCH] D33197: [libclang] [OpenCL] Expose more OpenCL CIndex types

2017-05-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: include/clang-c/Index.h:3080 + CXType_Elaborated = 119, + CXType_Pipe = 120, + CXType_OCLImage1dRO = 121, Can we have a doxygen comment about the OpenCL types? https://reviews.llvm.org/D33197

r303398 - When a type-id is unexpectedly given a name, assume that the name is unrelated

2017-05-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 18 20:54:59 2017 New Revision: 303398 URL: http://llvm.org/viewvc/llvm-project?rev=303398=rev Log: When a type-id is unexpectedly given a name, assume that the name is unrelated syntax unless we have a reason to think otherwise. This improves error recovery in a

[PATCH] D32146: PR32476: __nop_locale_mgmt.h not needed with newlib 2.5+

2017-05-18 Thread Ben Craig via Phabricator via cfe-commits
bcraig added inline comments. Comment at: include/support/newlib/xlocale.h:20 +#if defined(__NEWLIB__) && (__NEWLIB__ == 2) \ +&& defined(__NEWLIB_MINOR__) && (__NEWLIB_MINOR__ >= 5) \ +&& (!defined(__POSIX_VISIBLE) || (__POSIX_VISIBLE < 200809)) orivej

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Richard Smith via Phabricator via cfe-commits
rsmith added a comment. Should I assume our "misplaced ellipsis" diagnostic requires that we disambiguate the ill-formed ellipsis-after-declarator-id as a declaration in some cases? If so, do we have tests for that somewhere? Comment at: include/clang/Parse/Parser.h:2138 +

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-18 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 99517. jyu2 added a comment. Reid, Thank you so much for your comments. I upload new patch to address your suggestion. 1> Emit warning for throw exception in all noexcept function. And special diagnostic note for destructor and delete operators. 2> Silence

[PATCH] D15994: Allow for unfinished #if blocks in preambles.

2017-05-18 Thread Richard Smith via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. Some comments, but I'm happy for you to go ahead and commit after addressing them. Thanks! Comment at: include/clang/Lex/Preprocessor.h:2004 + ArrayRef getPreambleConditionalStack() const + { return

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Richard Smith via cfe-commits
On 18 May 2017 at 13:28, Dehao Chen wrote: > My understanding is that r302938 makes clang generate incorrect code > (clang itself), which lead to unexpected clang behavior. Is it correct? > Yes, I believe so, specifically when the stage2 clang is built with -fsanitize=memory

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-18 Thread Stanisław Barzowski via Phabricator via cfe-commits
sbarzowski updated this revision to Diff 99502. sbarzowski marked 8 inline comments as done. sbarzowski added a comment. Removed unnecessary colon from message https://reviews.llvm.org/D19201 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Parse/ParseTentative.cpp:542 + (Tok.is(tok::greatergreater) || + (Tok.is(tok::ellipsis) && + NextToken().isOneOf(tok::greater, tok::greatergreater,

[PATCH] D19201: [clang-tidy] misc-throw-with-noexcept

2017-05-18 Thread Stanisław Barzowski via Phabricator via cfe-commits
sbarzowski updated this revision to Diff 99500. sbarzowski marked 3 inline comments as done. sbarzowski added a comment. Docs and cosmetic issues https://reviews.llvm.org/D19201 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp

[PATCH] D33340: [libcxx] [test] Add string nullptr asserts to erase functions.

2017-05-18 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal created this revision. In my perf overhaul for MSVC++'s basic_string I wrote the null at data[oldsize] instead of data[newsize]; adding asserts to catch that bug. https://reviews.llvm.org/D33340 Files: test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp

[PATCH] D33329: clang-format: [JS] for await, and fix a crash with for loops.

2017-05-18 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303382: clang-format: [JS] for await, and fix a crash with for loops. (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D33329?vs=99468=99496#toc Repository: rL LLVM

r303382 - clang-format: [JS] for await, and fix a crash with for loops.

2017-05-18 Thread Martin Probst via cfe-commits
Author: mprobst Date: Thu May 18 16:19:29 2017 New Revision: 303382 URL: http://llvm.org/viewvc/llvm-project?rev=303382=rev Log: clang-format: [JS] for await, and fix a crash with for loops. Summary: The syntax is actually `for await (const x of y)` (d'oh). This also fixes a crash for `for`

[PATCH] D33339: Fix valid-for-expr ellipses eaten as invalid decl

2017-05-18 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast created this revision. The trial parse for declarative syntax accepts an invalid pack declaration syntax, which is ambiguous with valid pack expansions of expressions. This commit restricts the invalid pack declaration syntax to avoid mistaking valid pack expansions as

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Relevant https://reviews.llvm.org/D31370, https://reviews.llvm.org/D19201 https://reviews.llvm.org/D3 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think we should consider generalizing this to throwing from any noexcept function. We could add a special case diagnostic to explain that destructors and delete operators are noexcept by default in C++11. It's also probably a good idea to silence this warning if there

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Dehao Chen via cfe-commits
My understanding is that r302938 makes clang generate incorrect code (clang itself), which lead to unexpected clang behavior. Is it correct? If yes, how can I reproduce this issue so that I can try to triage/fix the problem? Thanks, Dehao On Thu, May 18, 2017 at 1:22 PM, Richard Smith

[clang-tools-extra] r303376 - [clangd] Make formatting.test asynchronous again.

2017-05-18 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Thu May 18 15:10:04 2017 New Revision: 303376 URL: http://llvm.org/viewvc/llvm-project?rev=303376=rev Log: [clangd] Make formatting.test asynchronous again. This test doesn't rely on the order of asynchronous messages, enable threads so we have at least some coverage for those

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Richard Smith via cfe-commits
On 18 May 2017 1:19 pm, "Richard Smith" wrote: On 18 May 2017 1:14 pm, "Dehao Chen" wrote: What's the issue? Build breaking? Performance regression? It's not clear from the limit info in this thread... r302938 introduced or exposed a miscompile that

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Richard Smith via cfe-commits
On 18 May 2017 1:14 pm, "Dehao Chen" wrote: What's the issue? Build breaking? Performance regression? It's not clear from the limit info in this thread... r302938 introduced or exposed a miscompile that causes a stage2 msan build of Clang to misbehave:

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Vitaly Buka via cfe-commits
Clang produces some confusing macro errors. According to Richard it's miscompilation: https://www.mail-archive.com/cfe-commits@lists.llvm.org/msg57270.html On Thu, May 18, 2017 at 1:14 PM Dehao Chen wrote: > What's the issue? Build breaking? Performance regression? It's not

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Dehao Chen via cfe-commits
What's the issue? Build breaking? Performance regression? It's not clear from the limit info in this thread... Dehao On Thu, May 18, 2017 at 1:02 PM, Vitaly Buka wrote: > Local build: r302937 no issue, r302938 has issue. > > On Thu, May 18, 2017 at 7:23 AM Dehao Chen

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Vitaly Buka via cfe-commits
Local build: r302937 no issue, r302938 has issue. On Thu, May 18, 2017 at 7:23 AM Dehao Chen wrote: > Could you give some context on how r302938 is related to this? > > Thanks, > Dehao > > On Wed, May 17, 2017 at 11:14 PM, Vitaly Buka > wrote: > >>

[PATCH] D33304: [WIP][clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. In https://reviews.llvm.org/D33304#758871, @aaron.ballman wrote: > In https://reviews.llvm.org/D33304#758808, @alexfh wrote: > > > In https://reviews.llvm.org/D33304#758713, @aaron.ballman wrote: > > > > > In https://reviews.llvm.org/D33304#758624, @srhines wrote: > > >

Re: r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-18 Thread Raphael Isemann via cfe-commits
Thanks for the quick fix! 2017-05-18 21:48 GMT+02:00 Richard Smith : > I see, the problem is that template parameters are temporarily put in the > wrong DeclContext while the rest of the declaration is being parsed (and > thus end up temporarily owned by the wrong module).

Re: r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-18 Thread Richard Smith via cfe-commits
I see, the problem is that template parameters are temporarily put in the wrong DeclContext while the rest of the declaration is being parsed (and thus end up temporarily owned by the wrong module). Fixed in r303373. On 18 May 2017 at 11:52, Richard Smith wrote: > Thanks

r303373 - When we enter a module within a linkage specification, switch the linkage

2017-05-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 18 14:34:55 2017 New Revision: 303373 URL: http://llvm.org/viewvc/llvm-project?rev=303373=rev Log: When we enter a module within a linkage specification, switch the linkage specification and the TU to the new module. This is necessary to get the module ownership

r303372 - Fix the location of "missing '; '" suggestions after annotation tokens.

2017-05-18 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu May 18 14:21:48 2017 New Revision: 303372 URL: http://llvm.org/viewvc/llvm-project?rev=303372=rev Log: Fix the location of "missing ';'" suggestions after annotation tokens. We were incorrectly setting PrevTokLocation to the first token in the annotation token instead of

[PATCH] D33304: [WIP][clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33304#758808, @alexfh wrote: > In https://reviews.llvm.org/D33304#758713, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D33304#758624, @srhines wrote: > > > > > In https://reviews.llvm.org/D33304#758621, @joerg wrote: > > > >

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-05-18 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. Throwing in the destructor is not good (C++11 change try to not allow see below). But in reality, those codes are exist. C++11 [class.dtor]p3: A declaration of a destructor that does not have an exception-specification is implicitly considered to have the same

[PATCH] D32248: CodeGen: Cast alloca to expected address space

2017-05-18 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303370: CodeGen: Cast alloca to expected address space (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D32248?vs=99204=99479#toc Repository: rL LLVM

r303370 - CodeGen: Cast alloca to expected address space

2017-05-18 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu May 18 13:51:09 2017 New Revision: 303370 URL: http://llvm.org/viewvc/llvm-project?rev=303370=rev Log: CodeGen: Cast alloca to expected address space Alloca always returns a pointer in alloca address space, which may be different from the type defined by the language.

[PATCH] D33304: [WIP][clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/android/AndroidTidyModule.cpp:15 +#include "../ClangTidyModuleRegistry.h" +#include "../readability/BracesAroundStatementsCheck.h" +#include "../readability/FunctionSizeCheck.h" Are readability headers

Re: r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-18 Thread Richard Smith via cfe-commits
Thanks for the awesome testcase, taking a look now. On 18 May 2017 at 07:15, Raphael Isemann wrote: > Hi, > > this is breaking our STL module builds. Can we revert this? > > We also have a minimal reproducer for our crash here > http://teemperor.de/pub/stl_merging_issue.zip

[PATCH] D33304: [WIP][clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D33304#758713, @aaron.ballman wrote: > In https://reviews.llvm.org/D33304#758624, @srhines wrote: > > > In https://reviews.llvm.org/D33304#758621, @joerg wrote: > > > > > I find the use of "must" at the very least inappropriate. If there was no

[PATCH] D33329: clang-format: [JS] for await, and fix a crash with for loops.

2017-05-18 Thread Martin Probst via Phabricator via cfe-commits
mprobst created this revision. Herald added a subscriber: klimek. The syntax is actually `for await (const x of y)` (d'oh). This also fixes a crash for `for` tokens not followed by additional tokens. https://reviews.llvm.org/D33329 Files: lib/Format/TokenAnnotator.cpp

[PATCH] D33328: [CodeGen] Pessimize aliasing for union members (and may-alias) objects

2017-05-18 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz updated this revision to Diff 99467. kparzysz edited subscribers, added: cfe-commits; removed: llvm-commits. kparzysz added a comment. The diff is the same as before, the change is in the subscribers: from llvm-commits to cfe-commits. Repository: rL LLVM

[PATCH] D31885: Remove TBAA information from LValues representing union members

2017-05-18 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz abandoned this revision. kparzysz added a comment. This review is replaced by https://reviews.llvm.org/D33328. Repository: rL LLVM https://reviews.llvm.org/D31885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33324: [index] Avoid infinite recursion when looking up a dependent name

2017-05-18 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked an inline comment as done. Closed by commit rL303366: [index] Avoid one more crash caused by infinite recursion that happens when (authored by arphaman). Changed prior to commit:

r303366 - [index] Avoid one more crash caused by infinite recursion that happens when

2017-05-18 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu May 18 13:06:07 2017 New Revision: 303366 URL: http://llvm.org/viewvc/llvm-project?rev=303366=rev Log: [index] Avoid one more crash caused by infinite recursion that happens when looking up a dependent name in a record that derives from itself rdar://32273000

[PATCH] D33304: [WIP][clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D33304#758624, @srhines wrote: > In https://reviews.llvm.org/D33304#758621, @joerg wrote: > > > I find the use of "must" at the very least inappropriate. If there was no > > use case for not including it, it wouldn't be an option. There

[PATCH] D33324: [index] Avoid infinite recursion when looking up a dependent name

2017-05-18 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir accepted this revision. benlangmuir added a comment. This revision is now accepted and ready to land. LGTM. One stylistic comment, but I'll leave that up to you. Comment at: lib/AST/CXXInheritance.cpp:286 +BaseRecord = nullptr; + else if

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Yan Wang via Phabricator via cfe-commits
yawanng marked an inline comment as done. yawanng added inline comments. Comment at: clang-tidy/android/FileDescriptorCheck.cpp:76 +int64_t val = aPInt.getSExtValue(); +if((val & O_CLOEXEC) == 0) + return false; srhines wrote: > Using O_CLOEXEC here

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-18 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303358: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource (authored by kparzysz). Changed prior to commit: https://reviews.llvm.org/D33284?vs=99353=99457#toc Repository: rL LLVM

r303358 - [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-18 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Thu May 18 12:07:11 2017 New Revision: 303358 URL: http://llvm.org/viewvc/llvm-project?rev=303358=rev Log: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource The functions creating LValues propagated information about alignment source. Extend the propagated data

[PATCH] D33324: [index] Avoid infinite recursion when looking up a dependent name

2017-05-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This is a regression introduced by r302632 . Repository: rL LLVM https://reviews.llvm.org/D33324 Files: include/clang/AST/CXXInheritance.h lib/AST/CXXInheritance.cpp test/Index/Core/index-dependent-source.cpp Index:

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ planned changes to this revision. NoQ added a comment. Todo: - See if the extra __kindofs leak into diagnostic messages. - Test how this behaves in cases (2) and (4), add tests. - Add tests for the recursive `__kindof` specifier merge (i.e. properly merge the second `__kindof` in

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. In https://reviews.llvm.org/D33304#758621, @joerg wrote: > I find the use of "must" at the very least inappropriate. If there was no use > case for not including it, it wouldn't be an option. There is also nothing > really Android-specific here beside maybe the open64

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Yan Wang via Phabricator via cfe-commits
yawanng updated this revision to Diff 99447. https://reviews.llvm.org/D33304 Files: clang-tidy/CMakeLists.txt clang-tidy/android/AndroidTidyModule.cpp clang-tidy/android/CMakeLists.txt clang-tidy/android/FileDescriptorCheck.cpp clang-tidy/android/FileDescriptorCheck.h

[PATCH] D33304: [clang-tidy] Add a new module Android and a new check for file descriptors.

2017-05-18 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I find the use of "must" at the very least inappropriate. If there was no use case for not including it, it wouldn't be an option. There is also nothing really Android-specific here beside maybe the open64 mess. Repository: rL LLVM https://reviews.llvm.org/D33304

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-18 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Can this use ErrorOr? https://reviews.llvm.org/D33272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-05-18 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Thanks for the comments, responses inline -- Comment at: lib/CodeGen/CGExprScalar.cpp:3854 + const Twine ) { + Value *GEPVal = Builder.CreateInBoundsGEP(Ptr, IdxList, Name); + filcab wrote: >

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-18 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D33191#758583, @NoQ wrote: > I think i found a relatively clean way of storing the kindof specifiers, > which is within the most-specialized type object itself. > > Like, if we see `Foo` being casted to `Foo<__kindof X, Y>` and in >

[PATCH] D33170: [X86] Adding avx512_vpopcntdq feature set and its intrinsics

2017-05-18 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:7526 +llvm::Type *ResultType = ConvertType(E->getType()); +Value *X = EmitScalarExpr(E->getArg(0)); +llvm::Function *F = CGM.getIntrinsic(Intrinsic::ctpop, ResultType);

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 99444. NoQ added a comment. Added a bit more info in the code comments. https://reviews.llvm.org/D33191 Files: lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp test/Analysis/generics.m Index: test/Analysis/generics.m

[PATCH] D33191: [analyzer] ObjCGenerics: account for __kindof specifiers met along a chain of casts.

2017-05-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 99443. NoQ added a comment. I think i found a relatively clean way of storing the kindof specifiers, which is within the most-specialized type object itself. Like, if we see `Foo` being casted to `Foo<__kindof X, Y>` and in another place to `Foo

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-18 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Yes, of course. Although "looks good to me" is acceptance whether or not I actually push a button in Phabricator. :) Repository: rL LLVM https://reviews.llvm.org/D33284

[PATCH] D33305: [ubsan] Add a check for pointer overflow UB

2017-05-18 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:3854 + const Twine ) { + Value *GEPVal = Builder.CreateInBoundsGEP(Ptr, IdxList, Name); + You're creating the GEP first (possibly triggering

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303353: [clang-format] Fix MatchingOpeningBlockLineIndex computation (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D32524?vs=99136=99442#toc Repository: rL LLVM

r303353 - [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu May 18 10:16:24 2017 New Revision: 303353 URL: http://llvm.org/viewvc/llvm-project?rev=303353=rev Log: [clang-format] Fix MatchingOpeningBlockLineIndex computation Summary: Computed line index must be relative to the current 'parent' node, and thus use CurrentLines

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. It should be enough for commit access. Mention your patches while requesting commit access. I'll submit this in the meantime. https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 99436. Typz marked an inline comment as done. Typz added a comment. Limit to 2 digits and not break before a matching numbered list sequence followed by a fullstop, to avoid interpreting numbers at the end of sentence as numbered bullets (and thus preventing

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 3 inline comments as done. Typz added inline comments. Comment at: lib/Format/BreakableToken.cpp:313 + // Numbered lists may also start with a number followed by '.' + static const char *kNumberedListPattern = "^[0-9]+\\. "; + hasSpecialMeaningPrefix =

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Indeed, I don't have commit access. But I was wondering if I should not get it, to simplify landing the patches after review. I read http://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access about this, but I am still wondering what is considered a "track record of

[PATCH] D32524: [clang-format] Fix MatchingOpeningBlockLineIndex computation

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Do you need me to commit this? https://reviews.llvm.org/D32524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Dehao Chen via cfe-commits
Could you give some context on how r302938 is related to this? Thanks, Dehao On Wed, May 17, 2017 at 11:14 PM, Vitaly Buka wrote: > +Dehao Chen > it started from r302938 > > On Wed, May 17, 2017 at 8:09 PM Jordan Rose via cfe-commits < >

Re: r303224 - [modules] When creating a declaration, cache its owning module immediately

2017-05-18 Thread Raphael Isemann via cfe-commits
Hi, this is breaking our STL module builds. Can we revert this? We also have a minimal reproducer for our crash here http://teemperor.de/pub/stl_merging_issue.zip - Raphael 2017-05-17 2:24 GMT+02:00 Richard Smith via cfe-commits : > Author: rsmith > Date: Tue May 16

[PATCH] D32525: [clang-format] Add SpaceBeforeColon option

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I checked the code of POCO, and it indeed follows this convention (though there does not seem to be any C++11 for loop indeed). We also use this style at our company. > Also see my comment. I could not find your comment... can you please re-post? > It's very hard to even

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:313 + // Numbered lists may also start with a number followed by '.' + static const char *kNumberedListPattern = "^[0-9]+\\. "; + hasSpecialMeaningPrefix = hasSpecialMeaningPrefix ||

[PATCH] D33053: [PowerPC] Implement vec_xxpermdi builtin.

2017-05-18 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. Other than the few minor comments, this LGTM. Comment at: lib/CodeGen/CGBuiltin.cpp:8458 +if (getTarget().isLittleEndian()) { + ElemIdx0 = (~Index & 1) + 2; + ElemIdx1 = (~Index & 2) >> 1; Minor nit: please add a comment

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 99427. Typz added a comment. - Use static regex to avoid recreating it each time - Add more tests https://reviews.llvm.org/D33285 Files: lib/Format/BreakableToken.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked an inline comment as done. Typz added inline comments. Comment at: lib/Format/BreakableToken.cpp:313 + // Numbered lists may also start with a number followed by '.' + static const char *kNumberedListPattern = "^[0-9]+\\. "; + hasSpecialMeaningPrefix =

[PATCH] D33284: [CodeGen] Propagate LValueBaseInfo instead of AlignmentSource

2017-05-18 Thread Krzysztof Parzyszek via Phabricator via cfe-commits
kparzysz added a comment. If you have no further comments, could you accept this review? Repository: rL LLVM https://reviews.llvm.org/D33284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33314: clang-format: Add option to remove semicolon at end of namespace

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. Is this not the same reasoning as the whole NamespaceEndCommentsFixer? https://reviews.llvm.org/D33314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [clang-tools-extra] r303344 - Fix 'not all control paths return a value' warning on windows buildbots.

2017-05-18 Thread Alexander Kornienko via cfe-commits
Thanks! On Thu, May 18, 2017 at 12:48 PM, Simon Pilgrim via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rksimon > Date: Thu May 18 05:48:23 2017 > New Revision: 303344 > > URL: http://llvm.org/viewvc/llvm-project?rev=303344=rev > Log: > Fix 'not all control paths return a value'

[PATCH] D32480: clang-format: Add CompactNamespaces option

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz marked 2 inline comments as done. Typz added inline comments. Comment at: include/clang/Format/Format.h:153 + /// \endcode + bool AllowSemicolonAfterNamespace; + Typz wrote: > djasper wrote: > > While I am not entirely opposed to this feature, I think it

[PATCH] D33314: clang-format: Add option to remove semicolon at end of namespace

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I think that this is more of a linter check and as such doesn't really belong to clang-format. @djasper: what do you think about this? https://reviews.llvm.org/D33314 ___ cfe-commits mailing list

[PATCH] D32480: [clang-format] Add BinPackNamespaces option

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 99421. Typz added a comment. clang-format: Add CompactNamespaces option - Change option name to CompactNamespaces - Clarify & test behavior when wrapping is needed - Separate from the 'remove semicolon' patch https://reviews.llvm.org/D32480 Files:

[PATCH] D33314: clang-format: Add option to remove semicolon at end of namespace

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. This option allows cleaning up namespace declaration, by removing the extra semicolon after namespace closing brace. https://reviews.llvm.org/D33314 Files: include/clang/Format/Format.h lib/Format/Format.cpp

[clang-tools-extra] r303344 - Fix 'not all control paths return a value' warning on windows buildbots.

2017-05-18 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Thu May 18 05:48:23 2017 New Revision: 303344 URL: http://llvm.org/viewvc/llvm-project?rev=303344=rev Log: Fix 'not all control paths return a value' warning on windows buildbots. Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyDiagnosticConsumer.cpp Modified:

r303343 - [index] Record references to class receivers used in property references

2017-05-18 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu May 18 05:43:11 2017 New Revision: 303343 URL: http://llvm.org/viewvc/llvm-project?rev=303343=rev Log: [index] Record references to class receivers used in property references rdar://32250025 Modified: cfe/trunk/lib/Index/IndexBody.cpp

[PATCH] D32477: [clang-format] Allow customizing the penalty for breaking assignment

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 99415. Typz added a comment. Add test to verify the option actually has some effect https://reviews.llvm.org/D32477 Files: include/clang/Format/Format.h lib/Format/Format.cpp lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp Index:

r303332 - [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

2017-05-18 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu May 18 03:07:52 2017 New Revision: 303332 URL: http://llvm.org/viewvc/llvm-project?rev=303332=rev Log: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore Summary: This patch makes NoLineBreakFormatter to insert a break before tokens where MustBreakBefore

[PATCH] D33238: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303332: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33238?vs=99405=99407#toc Repository: rL LLVM

[PATCH] D33238: [clang-format] Make NoLineBreakFormatter respect MustBreakBefore

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 99405. krasimir added a comment. - Add comment about import statements. https://reviews.llvm.org/D33238 Files: lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineFormatter.cpp Index: lib/Format/UnwrappedLineFormatter.cpp

r303330 - clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Thu May 18 02:36:21 2017 New Revision: 303330 URL: http://llvm.org/viewvc/llvm-project?rev=303330=rev Log: clang-format: fix prefix for doxygen comments after member Summary: Doxygen supports putting documentation blocks after member, by adding an additional < marker in

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303330: clang-format: fix prefix for doxygen comments after member (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D33282?vs=99307=99402#toc Repository: rL LLVM

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll commit this. https://reviews.llvm.org/D33282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33285: clang-format: do not reflow bullet lists

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:313 + // Numbered lists may also start with a number followed by '.' + static const char *kNumberedListPattern = "^[0-9]+\\. "; + hasSpecialMeaningPrefix = hasSpecialMeaningPrefix || A

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I don't have commit access, can someone please commit this patch? https://reviews.llvm.org/D33282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33282: clang-format: fix prefix for doxygen comments after member

2017-05-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good. Thank you! https://reviews.llvm.org/D33282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-05-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. When you say "this doesn't happen in tests", do you mean this never happens when there are parentheses around the expression? Comment at: unittests/Format/FormatTest.cpp:2476 "bool value = a\n" -

[PATCH] D15994: Allow for unfinished #if blocks in preambles.

2017-05-18 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping?! https://reviews.llvm.org/D15994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33042: [libclang] Allow to suspend a translation unit.

2017-05-18 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping :) https://reviews.llvm.org/D33042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33045: [libclang] Avoid more stats than necessary for reparse.

2017-05-18 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping :) https://reviews.llvm.org/D33045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r302966 - Remove unused tracking of owning module for MacroInfo objects.

2017-05-18 Thread Vitaly Buka via cfe-commits
+Dehao Chen it started from r302938 On Wed, May 17, 2017 at 8:09 PM Jordan Rose via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Thanks, this is helpful! > > > On May 16, 2017, at 12:26, Richard Smith wrote: > > On 15 May 2017 at 10:28, Jordan