[PATCH] D56936: Fix handling of overriden methods during ASTImport

2019-01-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. So the problem is that there are references to `ParmVarDecl` from inside function body and at import of `ParmVarDecl` always a new one is created even if there is an already existing (in the existing function prototype)? Maybe it works in `VisitParmVarDecl` to search f

[clang-tools-extra] r351929 - [clangd] Link clangTidy into clangd tests

2019-01-23 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jan 23 00:04:17 2019 New Revision: 351929 URL: http://llvm.org/viewvc/llvm-project?rev=351929&view=rev Log: [clangd] Link clangTidy into clangd tests Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D57077 Modified: clang-tools-extra/trunk/unit

[PATCH] D55400: [analyzer] Move out tracking retain count for OSObjects into a separate checker

2019-01-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D55400#1367046 , @george.karpenkov wrote: > > Hmmm, does this mess with options that bad? Could you please clarify? > > `registerChecker` gets-or-creates a checker object. A checker name (used for > getting the options) is s

[PATCH] D57062: [analyzer] Re-enable the "System is over constrained" assertion on optimized builds.

2019-01-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Hmmm, came across this one in the not too distant future, and always wondered how painful that performance hit would be that even Release+Asserts should be spared from it. I think 5% per

[PATCH] D57062: [analyzer] Re-enable the "System is over constrained" assertion on optimized builds.

2019-01-23 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. And if we find out that this is far too painful, we can always put it back anyways. Doubt that'll happen though. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57062/new/ https://reviews.llvm.org/D57062 __

[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

2019-01-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay created this revision. MyDeveloperDay added reviewers: alexfh, JonasToth, hokein, Eugene.Zelenko, aaron.ballman. MyDeveloperDay added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. The usefulness of **modernize-use-override** can be reduced if you h

[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

2019-01-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 183063. MyDeveloperDay added a comment. Adding release note change CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57087/new/ https://reviews.llvm.org/D57087 Files: clang-tidy/modernize/UseOverrideCheck.cpp clang-tidy/modernize/UseOverride

[PATCH] D56925: Do not use frame pointer by default for MSP430

2019-01-23 Thread George Rimar via Phabricator via cfe-commits
grimar added a comment. Thanks for adding a test case! I know not enough about msp430/clang to verify it, unfortunately. (I just asked for a test because it is always useful to have one for any non-NFC patch). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56925/

[PATCH] D56936: Fix handling of overriden methods during ASTImport

2019-01-23 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > So the problem is that there are references to ParmVarDecl from inside > function body and at import of ParmVarDecl always a new one is created even > if there is an already existing (in the existing function prototype)? Yes. During the import of the body we import a

[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

2019-01-23 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This is definitely an improvement, though I don't know if it's *right*. @akyrtzi, thoughts? Comment at: unittests/AST/NamedDeclPrinterTest.cpp:206 +"property", +"(class extension)::property")); +} One concern is that similarl

Re: [clang-tools-extra] r351788 - [clangd] Filter out plugin related flags and move all commandline manipulations into OverlayCDB.

2019-01-23 Thread Kadir Çetinkaya via cfe-commits
Hey Hans, There is actually a parent for this patch at https://reviews.llvm.org/rC351531 and it hasn't been merged. In addition to that not exactly as a follow-up, but there is https://reviews.llvm.org/rCTE351738 which is kind of related to this two patches, you might also consider merging that b

[clang-tools-extra] r351941 - [clangd] Fix crash due to ObjCPropertyDecl

2019-01-23 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jan 23 02:35:12 2019 New Revision: 351941 URL: http://llvm.org/viewvc/llvm-project?rev=351941&view=rev Log: [clangd] Fix crash due to ObjCPropertyDecl With ObjCPropertyDecl, ASTNode.OrigD can be a ObjCPropertyImplDecl which is not a NamedDecl, leading to a crash since

[PATCH] D56916: Fix crash due to ObjCPropertyDecl

2019-01-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351941: [clangd] Fix crash due to ObjCPropertyDecl (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D56916?vs=182942&id=

[PATCH] D56916: Fix crash due to ObjCPropertyDecl

2019-01-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Done. I had to remove `Container::_magic` from the list of expeced symbols to make the test pass, let me know if it should actually be there. Again, thanks for the fix! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56916/new/ https:

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Sam McCall via cfe-commits
Ugh, sorry about this :-\ Some random observations: - I didn't think clang itself could actually hit that codepath (open=false then open=true for the same file). Though not surprising it's precompiled-headers related, that's similar to how clangd hit it. - The obvious failure mode (file state ac

[clang-tools-extra] r351943 - [clangd] Workaround a test failure after r351941

2019-01-23 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Jan 23 03:32:07 2019 New Revision: 351943 URL: http://llvm.org/viewvc/llvm-project?rev=351943&view=rev Log: [clangd] Workaround a test failure after r351941 This should fix failing buildbots. Modified: clang-tools-extra/trunk/unittests/clangd/SymbolCollectorTests.

[PATCH] D56935: [NewPM] Add support for new-PM plugins to clang

2019-01-23 Thread Philip Pfaffe via Phabricator via cfe-commits
philip.pfaffe added a comment. I'm not sure what the current state of plugins on windows is. They were broken and disabled last time I worked on this, but that might've changed in the meantime! Worth checking. Comment at: clang/include/clang/Basic/CodeGenOptions.h:292 + ///

[PATCH] D56916: Fix crash due to ObjCPropertyDecl

2019-01-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. It looks like `Container::_magic` is a platform-dependent completion, I don't have it on Linux, but http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/42665 fails because it's not in the list. Submitted rL351943

[PATCH] D57093: [CodeComplete] [clangd] Fix crash on ValueDecl with a null type

2019-01-23 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric. https://reviews.llvm.org/D57093 Files: clang-tools-extra/clangd/ExpectedTypes.cpp clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp clang/lib/S

[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

2019-01-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. I tend to think that a better migration strategy is to change the compiler to a C++11-compatible one first, and then turn on C++11 mode and migrate the code (possibly file-by-file or

[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

2019-01-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:517 + has(compoundStmt( + has(caseStmt(hasDescendant(ifStmt(hasThen(returnsBool(Value)), +unless(hasElse(st

[PATCH] D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers.

2019-01-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56849/new/ https://reviews.llvm.org/D56849 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2019-01-23 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:136 + case Stmt::UnaryExprOrTypeTraitExprClass: +if (cast(Left)->isArgumentType() && +cast(Right)->isArgumentType()) Any reasons not to pull out the results of `ca

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
On Wed, Jan 23, 2019 at 5:44 AM Sam McCall wrote: > Ugh, sorry about this :-\ > > Some random observations: > - I didn't think clang itself could actually hit that codepath > (open=false then open=true for the same file). Though not surprising it's > precompiled-headers related, that's similar t

[PATCH] D57093: [CodeComplete] [clangd] Fix crash on ValueDecl with a null type

2019-01-23 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp:2322 +TEST(CompletionTest, CrashOnNullType) { + auto Results = completions(R"cpp( ---

[PATCH] D57064: [Sema] Improve a -Warray-bounds diagnostic

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM with a testing request and some small nits. Comment at: clang/include/clang/AST/ASTContext.h:2092 + Optional getTypeSizeInCharsIfKnown(QualType Ty) const

[PATCH] D54395: [clang-tidy] implement utility-function to add 'const' to variables

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. ping :) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54395/new/ https://reviews.llvm.org/D54395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, steveire. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Introduce `GenericSelectionExpr::Association` which wraps an association expression and its `TypeSourceInfo`. Add the boilerplate necess

[PATCH] D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman edited reviewers, added: aaron.ballman; removed: lattner. aaron.ballman added a comment. Can you also add a test case to `TestMiscStmts()` in clang\test\AST\ast-dump-stmt.c that demonstrates we calculate the correct resulting type and don't lose the extra null statements from the A

[PATCH] D56959: [AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5068 + Association getAssociation(unsigned I) const { +return Association(cast(SubExprs[END_EXPR + I]), AssocTypes[I], riccibruno wrote: > aaron.ballman wrote: > > steveire wrote: > > >

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Sam McCall via cfe-commits
(Email is better than IRC if that's OK - I don't know this code that well so it takes me a while). Thanks, that's definitely interesting and not what I expected. I thought every call sequence r347205 changed the behavior of would have resulted in two calls to getStatValue(). I guess the "pch"/"mai

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is looking great! I've got some comments, mostly nits. Just to double-check, have you verified that these changes do not break any existing tests (in clang or clang-tools-extra)? Comment at: include/clang/AST/Expr.h:5026 + /// result expre

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: aaron.ballman, alexfh, hokein, baloghadamsoftware. Herald added subscribers: cfe-commits, rnkovacs, xazax.hun, mgorny. The check `bugprone-exception-escape` does an AST-based analysis to determine if a function might throw an exception an

[PATCH] D56160: [clang-tidy] modernize-use-trailing-return check

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D56160#1367074 , @bernhardmgruber wrote: > Thank you again @JonasToth for all your valueable input! I could almost > successfully run my check on the llvm/lib subfolder. I created a compilation > database from within Visual

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Two passing-by remarks: 1. I would *love* for this check to produce less cryptic reports :) It currently does not output any details whatsoever. It's really unhelpful. 2. It would be great for it to be generalized to not only detect the escaping of exceptions out of

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
On Wed, Jan 23, 2019 at 9:54 AM Sam McCall wrote: > (Email is better than IRC if that's OK - I don't know this code that well > so it takes me a while). > > Thanks, that's definitely interesting and not what I expected. I thought > every call sequence r347205 changed the behavior of would have re

[PATCH] D57012: Merge similar target diagnostics for interrupt attribute into one. NFC

2019-01-23 Thread Kristina Bessonova via Phabricator via cfe-commits
krisb added a comment. @aaron.ballman yes and yes. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57012/new/ https://reviews.llvm.org/D57012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Thanks for doing this! It would be easier to review (now and in the future!) if you split it into at least 3 commits - Refactor without changing API to use trailing objects - The change to use bitfields and Stmt.h - Introduce new class GenericSelectionExpr::Association

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D57100#1367813 , @lebedev.ri wrote: > Two passing-by remarks: > > 1. I would *love* for this check to produce less cryptic reports :) It > currently does not output any details whatsoever. It's really unhelpful. I would do

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 183099. JonasToth removed a subscriber: lebedev.ri. JonasToth added a comment. - adjust doc to say semicolon separated list instead of comma Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57100/new/ https://rev

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
With your patch reverted locally, at the same breakpoint I instead get $ lsof -p 95842 | wc -l 94 So your patch seems to increase number of open file handles by ~260%. On Wed, Jan 23, 2019 at 10:27 AM Nico Weber wrote: > On Wed, Jan 23, 2019 at 9:54 AM Sam McCall wrote: > >> (Email is b

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D57100#1367817 , @JonasToth wrote: > In D57100#1367813 , @lebedev.ri > wrote: > > > 2. It would be great for it to be generalized to not only detect the > > escaping of exceptions ou

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 13 inline comments as done. riccibruno added a comment. In D57098#1367769 , @aaron.ballman wrote: > This is looking great! I've got some comments, mostly nits. Just to > double-check, have you verified that these changes do not break an

[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/modernize/UseOverrideCheck.cpp:133 +StringRef Correct = +HasFinal ? "'" + FinalMacro + "'" : "'" + OverrideMacro + "'"; Dangling? These values seem to be temporary and `StringRef` would bind to

[PATCH] D56916: Fix crash due to ObjCPropertyDecl

2019-01-23 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D56916#1367559 , @ilya-biryukov wrote: > It looks like `Container::_magic` is a platform-dependent completion, I don't > have it on Linux, but > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/bu

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:5208 + ArrayRef getAssocExprs() const { +return {reinterpret_cast(getTrailingObjects() + +ASSOC_EXPR_START), --

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D57098#1367816 , @steveire wrote: > Thanks for doing this! > > It would be easier to review (now and in the future!) if you split it into at > least 3 commits > > - Refactor use trailing objects without introducing the Assoc

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D57098#1367852 , @riccibruno wrote: > In D57098#1367816 , @steveire wrote: > > > Thanks for doing this! > > > > It would be easier to review (now and in the future!) if you split it into

Re: [clang-tools-extra] r351788 - [clangd] Filter out plugin related flags and move all commandline manipulations into OverlayCDB.

2019-01-23 Thread Hans Wennborg via cfe-commits
Thanks for the info! On Wed, Jan 23, 2019 at 2:24 AM Kadir Çetinkaya wrote: > > Hey Hans, > > There is actually a parent for this patch at > https://reviews.llvm.org/rC351531 and it hasn't been merged. I've merged it now in r351961. > > In addition to that not exactly as a follow-up, but there

[PATCH] D57101: [AST] Fix addr space of result type for dereference operator

2019-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added a reviewer: rjmccall. When we dereference a pointer the result of the dereference operation is no longer in the address space of its pointee i.e. __attribute__((address_space(1))) int * a; (*a);// the expression is in the default addr space a

[PATCH] D57101: [AST] Fix addr space of result type for dereference operator

2019-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 183108. Anastasia added a comment. - Minot update to the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57101/new/ https://reviews.llvm.org/D57101 Files: lib/Sema/SemaExpr.cpp test/SemaOpenCLCXX/address_space_overloading.cl Index: t

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Sam McCall via cfe-commits
Thanks! given that we don't see an earlier stat, I guess these files were being treated as virtual (file metadata deserialized from PCH). Previously despite the open=true these never actually got opened, and that worked fine. I'm away from my computer but will verify later tonight or in the mornin

[PATCH] D56760: Add a new builtin: __builtin_dynamic_object_size

2019-01-23 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. I pointed out this review to Jonathan Wakely, who posted it to the GCC list . Jakub replied with: > The current modes (0-3) certainly must not be changed and must return a > constant, that is what huge amounts of code in the

[PATCH] D56003: [RFC] [CFE] Allocatable Global Register Variables for ARM

2019-01-23 Thread Carey Williams via Phabricator via cfe-commits
carwil updated this revision to Diff 183114. carwil added a comment. More tests, and better handling of argument combination errors. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56003/new/ https://reviews.llvm.org/D56003 Files: docs/ClangCommandLineReference.rst include/clang/Driv

[PATCH] D57102: [extra] unit tests enable crash-recovery cases on FreeBSD

2019-01-23 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added a reviewer: steveire. devnexen created this object with visibility "All Users". Herald added a subscriber: cfe-commits. Seems the previous statement does not hold up anymore. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D57102 Fil

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
Stacks for getFile() from PCH files look like so: (lldb) bt * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 * frame #0: 0x00010005a1fb clang-cl`clang::FileManager::getFile(this=0x0001106111f0, Filename=(Data = "/Users/thakis/src/chrome/src/out/gnwin/../../third

[PATCH] D57104: [AST] Pack GenericSelectionExpr

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, steveire. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Store the controlling expression, the association expressions and the corresponding `TypeSourceInfo`s as trailing objects. Additionall

r351969 - Merge similar target diagnostics for interrupt attribute into one; NFC

2019-01-23 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jan 23 10:02:17 2019 New Revision: 351969 URL: http://llvm.org/viewvc/llvm-project?rev=351969&view=rev Log: Merge similar target diagnostics for interrupt attribute into one; NFC Patch by Kristina Bessonova! Modified: cfe/trunk/include/clang/Basic/DiagnosticSem

[PATCH] D57012: Merge similar target diagnostics for interrupt attribute into one. NFC

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit in r351969, thank you for the patch! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57012/new/ https://reviews.llvm.org/D57012 ___ cfe-com

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added reviewers: aaron.ballman, steveire. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Introduce a new class `GenericSelectionExpr::Association` which bundle together an association expression and its `TypeSourceInfo`. An

[PATCH] D57098: [WIP][AST] NFC: Introduce new class GenericSelectionExpr::Association

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 18 inline comments as done. riccibruno added a comment. In D57098#1367853 , @steveire wrote: > In D57098#1367852 , @riccibruno > wrote: > > > In D57098#1367816

[PATCH] D57001: [libunwind] Don't define unw_fpreg_t to uint64_t for __ARM_DWARF_EH__

2019-01-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I have no problem with the code change, but no context on whether or not it is correct. I'm hoping some other people familiar with ARM and DWARF can chime in. Repository: rUNW libunwind CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57001/new/ https://rev

[PATCH] D57101: [AST] Fix addr space of result type for dereference operator

2019-01-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. What? No, the l-value should still be qualified like the pointee type. An l-value-to-r-value conversion should remove the qualifier, but not just a dereference. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57101/new/ https://reviews.llvm.org/D57101

[PATCH] D57087: [clang-tidy] add OverrideMacro to modernize-use-override check

2019-01-23 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D57087#1367610 , @alexfh wrote: > I tend to think that a better migration strategy is to change the compiler to > a C++11-compatible one first, and then turn on C++11 mode and migrate the > code (possibly file-by-file o

[PATCH] D56760: Add a new builtin: __builtin_dynamic_object_size

2019-01-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D56760#1367915 , @jfb wrote: > @rsmith, what do you think and how do you want to proceed? We think something > like what Erik implemented will catch things `_FORTIFY_SOURCE` currently > cannot. We agree there are valid

[PATCH] D57104: [AST] Pack GenericSelectionExpr

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Splitting the introduction of and porting to `Create` would significantly reduce the number of files touched by the 'real' change in this commit, and therefore reduce noise in the commit (following the idea of "do one thing per commit" to make the code reviewable in th

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
The way things worked before your patch is that getFile() calls for headers that are loaded from a PCH file hit the early-ish return in if (UFE.isValid()) { // Already have an entry with this inode, return it. The first stack I posted (with ReadControlBlock() in it) populates this UniqueRealFil

[PATCH] D57104: [AST] Pack GenericSelectionExpr

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I haven't done a full review as it's not obvious what parts of the diff relate to which separate change. Perhaps Aaron will review and approve though for you anyway. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57104/new/ htt

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Just in case you didn't know, you could have (and still can!) just update https://reviews.llvm.org/D57098 instead of creating a new PR. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57106/new/ https://reviews.llvm.org/D57106

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: lib/AST/ASTDumper.cpp:1465 - for (unsigned I = 0, N = E->getNumAssocs(); I != N; ++I) { + for (GenericSelectionExpr::ConstAssociation Assoc : E->associations()) { dumpChild([=] { Range for loops in this file ge

[PATCH] D57104: [AST] Pack GenericSelectionExpr

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked an inline comment as done. riccibruno added a comment. In D57104#1368055 , @steveire wrote: > Splitting the introduction of and porting to `Create` would significantly > reduce the number of files touched by the 'real' change in this com

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 183131. JonasToth added a comment. - [Fix] make class name correct Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57100/new/ https://reviews.llvm.org/D57100 Files: clang-tidy/bugprone/ExceptionEscapeCheck.cp

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:35 + std::vector FunctionsThatShouldNotThrowVec = + utils::options::parseStringList(RawFunctionsThatShouldNotThrow); FunctionsThatShouldNotThrow.insert(FunctionsThatShouldNotThrowV

[PATCH] D57108: [clang-tidy] diagnose possibiltiy to add 'noexcept' in modernize-use-noexcept

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth created this revision. JonasToth added reviewers: aaron.ballman, alexfh, hokein. Herald added subscribers: xazax.hun, mgorny. This patch utilizes the refactored `ExceptionAnalyzer` for `modernize-use-noexcept` to diagnose possibilties to introduce `noexcept` if there is no exception spec

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 3 inline comments as done. JonasToth added inline comments. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:35 + std::vector FunctionsThatShouldNotThrowVec = + utils::options::parseStringList(RawFunctionsThatShouldNotThrow); FunctionsThatShouldN

[PATCH] D57100: [clang-tidy] refactor bugprone-exception-escape analysis into class

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 183134. JonasToth marked an inline comment as done. JonasToth added a comment. - add license to exceptionanalyzer Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57100/new/ https://reviews.llvm.org/D57100 Files

[PATCH] D57108: [clang-tidy] diagnose possibiltiy to add 'noexcept' in modernize-use-noexcept

2019-01-23 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 183136. JonasToth added a comment. - rebase to current refactoring Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57108/new/ https://reviews.llvm.org/D57108 Files: clang-tidy/bugprone/ExceptionEscapeCheck.cp

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
Here's what I think is a repro: Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat foo.h Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat foo2.h Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat pch.h #include "foo.h" Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat pch.cc Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat client.cc #in

[PATCH] D56924: Handle ObjCCategoryDecl class extensions for print

2019-01-23 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D56924#1367450 , @sammccall wrote: > This is definitely an improvement, though I don't know if it's *right*. > @akyrtzi, thoughts? Yeah, I'm not sure what the desired behavior is. When writing up the test I noticed there is

[PATCH] D57104: [AST] Pack GenericSelectionExpr

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5043 + // association expressions. + enum { CONTROLLING = 0, ASSOC_EXPR_START = 1 }; + Do we want to use `ControllingIndex` and `AssocExprStartIndex` and combine with the enum you intr

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
On Wed, Jan 23, 2019 at 2:17 PM Nico Weber wrote: > Here's what I think is a repro: > > Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat foo.h > Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat foo2.h > Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat pch.h > #include "foo.h" > Nicos-MacBook-Pro:llvm-mono-2 thakis$ c

[PATCH] D56935: [NewPM] Add support for new-PM plugins to clang

2019-01-23 Thread Marco Elver via Phabricator via cfe-commits
melver updated this revision to Diff 183140. melver added a comment. - Revert use of SmallVector CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56935/new/ https://reviews.llvm.org/D56935 Files: clang/include/clang/Basic/CodeGenOptions.h clang/include/clang/Driver/Options.td clang/

[PATCH] D56935: [NewPM] Add support for new-PM plugins to clang

2019-01-23 Thread Marco Elver via Phabricator via cfe-commits
melver added a comment. Thanks! In D56935#1367545 , @philip.pfaffe wrote: > I'm not sure what the current state of plugins on windows is. They were > broken and disabled last time I worked on this, but that might've changed in > the meantime! Worth che

[PATCH] D53329: Generate DIFile with main program if source is not available

2019-01-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Thanks for filing the bug/reducing a test case - this change should include an automated test case that captures this issue (check for other tests that pass -gembed-source to see how this might be tested, possibly expanding the existing test case case or introducing a

[PATCH] D57111: Make Clang not crash on calls to destructors on incomplete pointer types

2019-01-23 Thread Roman Zhikharevich via Phabricator via cfe-commits
rzhikharevich created this revision. rzhikharevich added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes handling of code like this: c++ struct Foo; void foo(Foo *p) { p.~Foo(); } Repository: rC Clang https://reviews.llvm.org/D57111 Files: clang/l

Re: r347205 - [FileManager] getFile(open=true) after getFile(open=false) should open the file.

2019-01-23 Thread Nico Weber via cfe-commits
This might finally be a repro! Nicos-MacBook-Pro:llvm-mono-2 thakis$ ls bar foo.h foo2.h Nicos-MacBook-Pro:llvm-mono-2 thakis$ type foo.h -bash: type: foo.h: not found Nicos-MacBook-Pro:llvm-mono-2 thakis$ ls bar foo.h foo2.h Nicos-MacBook-Pro:llvm-mono-2 thakis$ cat bar/foo.h #include "foo2.h" Ni

[PATCH] D57112: [ASTTypeTraits] OMPClause handling

2019-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: sbenza, bkramer, pcc, klimek, hokein. lebedev.ri added a project: OpenMP. lebedev.ri added a child revision: D57113: [clang-tidy] openmp-use-default-none - a new module and a check. `OMPClause` is the base class, it is not descendant f

[PATCH] D56760: Add a new builtin: __builtin_dynamic_object_size

2019-01-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D56760#1368054 , @erik.pilkington wrote: > So it seems like the GCC people want to keep `__builtin_object_size` static. I don't see any evidence of that. Jakub said that modes 0-3 should stay static, but that's in line with w

[PATCH] D57113: [clang-tidy] openmp-use-default-none - a new module and a check

2019-01-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: JonasToth, aaron.ballman, alexfh, xazax.hun, hokein. lebedev.ri added projects: clang-tools-extra, OpenMP. Herald added subscribers: guansong, rnkovacs, mgorny. Finds OpenMP directives that are allowed to contain `default` clause, but e

[PATCH] D57111: Make Clang not crash on calls to destructors on incomplete pointer types

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Upload patches with full context please. Also the diagnostic seems to be wrong ? And finally is there a bug report for this ? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57111/new/ https://reviews.llvm.org/D57111 _

[PATCH] D56561: [Preprocessor] For missing file in framework add note about framework location.

2019-01-23 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56561/new/ https://reviews.llvm.org/D56561 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D57111: Make Clang not crash on calls to destructors on incomplete pointer types

2019-01-23 Thread Roman Zhikharevich via Phabricator via cfe-commits
rzhikharevich added a comment. In D57111#1368224 , @riccibruno wrote: > Upload patches with full context please. > Also the diagnostic seems to be wrong ? I don't think so, the valid code would be 'p->~C()'. > And finally is there a bug report for this

[PATCH] D57106: [AST] Introduce GenericSelectionExpr::Association

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/AST/Expr.h:5099 + public: +using iterator_category = std::forward_iterator_tag; +using value_type = AssociationTy; Carrying over the conversation from D57098: >> @aaron.ballman It seems like

[PATCH] D57114: Remove Expr sugar decorating the CXXUuidofExpr node.

2019-01-23 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Sugar, like ConstantExpr, causes an infinite expansion of the template object. Repository: rC Clang https://reviews.llvm.org/D57114 Files: lib/Sema/SemaTemplate.cpp test/CodeGenCXX/pr40395.

[PATCH] D57111: Make Clang not crash on calls to destructors on incomplete pointer types

2019-01-23 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D57111#1368230 , @rzhikharevich wrote: > In D57111#1368224 , @riccibruno > wrote: > > > Upload patches with full context please. > > Also the diagnostic seems to be wrong ? > > > I

[PATCH] D57114: Remove Expr sugar decorating the CXXUuidofExpr node.

2019-01-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:6311 if (isa(E)) { - Converted = TemplateArgument(ArgResult.get()); + Converted = TemplateArgument(ArgResult.get()->IgnoreImpCasts()); break; `IgnoreP

[PATCH] D56760: Add a new builtin: __builtin_dynamic_object_size

2019-01-23 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D56760#1368216 , @rsmith wrote: > In D56760#1368054 , @erik.pilkington > wrote: > > > So it seems like the GCC people want to keep `__builtin_object_size` static. > > > I don't see any evide

[PATCH] D57111: Make Clang not crash on calls to destructors on incomplete pointer types

2019-01-23 Thread Roman Zhikharevich via Phabricator via cfe-commits
rzhikharevich added a comment. In D57111#1368256 , @riccibruno wrote: > I guess you will want someone to commit it ? Yes, if the fix is correct. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57111/new/ https://reviews.l

[PATCH] D56760: Add a new builtin: __builtin_dynamic_object_size

2019-01-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D56760#1368216 , @rsmith wrote: > I don't see any evidence of that. Jakub said that modes 0-3 should stay > static, but that's in line with what we suggested. I don't think Jakub really said anything about whether we

[PATCH] D57104: [AST] Pack GenericSelectionExpr

2019-01-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. In D57104#1368072 , @riccibruno wrote: > In D57104#1368055 , @steveire wrote: > > > Splitting the introduction of and porting to `Create` would significantly > > reduce the number of files

  1   2   >