[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 145155. baloghadamsoftware added a comment. Retrying... https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeCheck.cpp clang-tidy/bugprone/

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D33537#1086571, @alexfh wrote: > It looks like you've missed some comments or uploaded a wrong patch. The latter. Now I retried to upload the correct patch. https://reviews.llvm.org/D33537 _

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. How about tests for functions with conditional noexcept? Comment at: docs/clang-tidy/checks/bugprone-exception-escape.rst:8-9 +* Destructors +* Copy constructors +* Copy assignment operators +* The ``main()`` functions Are copy construc

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-04 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl updated this revision to Diff 145156. r.stahl marked 3 inline comments as done. r.stahl added a comment. addressed the comments, thanks! If it looks good, please commit for me. https://reviews.llvm.org/D45774 Files: lib/StaticAnalyzer/Core/RegionStore.cpp lib/StaticAnalyzer/Core/SV

[PATCH] D45774: [analyzer] cover more cases where a Loc can be bound to constants

2018-05-04 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added inline comments. Comment at: lib/StaticAnalyzer/Core/RegionStore.cpp:1723 +if (const InitListExpr *InitList = dyn_cast(Init)) { + if (const Expr *FieldInit = InitList->getInit(FD->getFieldIndex())) { +if (Optional V = svalBuilder.getCons

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Mailing List "cfe-commits" via Phabricator via cfe-commits
cfe-commits added a subscriber: junbuml. cfe-commits added a comment. I think you and Richard agreed that you weren’t going to synthesize a whole expression tree at every use of the operator, and I agree with that decision. That’s very different from what I’m asking you to do, which is to synthesi

Re: [PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via cfe-commits
I think you and Richard agreed that you weren’t going to synthesize a whole expression tree at every use of the operator, and I agree with that decision. That’s very different from what I’m asking you to do, which is to synthesize in isolation a call to the copy-constructor. There are several place

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-05-04 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 145159. szepet added a comment. Format changes added based on comments. https://reviews.llvm.org/D38845 Files: lib/AST/ASTImporter.cpp unittests/AST/ASTImporterTest.cpp Index: unittests/AST/ASTImporterTest.cpp ===

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-04 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl created this revision. r.stahl added reviewers: NoQ, dcoughlin, xazax.hun, george.karpenkov. Herald added subscribers: cfe-commits, a.sidorin, rnkovacs, szepet. The existing CTU mechanism imports FunctionDecls where the definition is available in another TU. This patch extends that to Var

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-04 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Tests and doc fixes pending. First I'm interested in your thoughts to this change. It allows to bind more symbolic values to constants if they have been defined and initialized in another TU: use.c: extern int * const p; extern struct S * const s; def.c: int *

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-05-04 Thread Peter Szecsi via Phabricator via cfe-commits
szepet updated this revision to Diff 145160. szepet marked 2 inline comments as done. szepet added a comment. Changes based on comments. https://reviews.llvm.org/D40937 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/InfiniteLoopChe

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: unittests/AST/ASTImporterTest.cpp:211 StringRef Code; StringRef FileName; std::unique_ptr Unit; Can't we have the same problem with FileName? Perhaps an other alternative would be to make the members real

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-05-04 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:88 + +const Stmt *ExprMutationAnalyzer::findDirectMutation(const Expr *Exp) { + // LHS of any assignment operators. shuaiwang wrote: > aaron.ballman wrote: > > Should this als

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D45476#1087446, @cfe-commits wrote: > I think you and Richard agreed that you weren’t going to synthesize a whole > expression tree at every use of the operator, and I agree with that > decision. That’s very different from what I’m asking you

Re: [PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via cfe-commits
Woops. Submitted that last comment too early. Editing it on Phab. On Fri, May 4, 2018 at 2:31 AM, Eric Fiselier via Phabricator < revi...@reviews.llvm.org> wrote: > EricWF added a comment. > > In https://reviews.llvm.org/D45476#1087446, @cfe-commits wrote: > > > I think you and Richard agreed tha

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Is this some sort of a vendor extension then? OpenCL 1.2 atomic builtins don't have ordering parameter. Repository: rC Clang https://reviews.llvm.org/D46386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added subscribers: pcc, klimek. a.sidorin added a comment. Hi Gabor, > Can't we have the same problem with FileName? As I can see, no. FileName is copied into std::string while building compilation arguments. > Perhaps an other alternative would be to make the members real strings.

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 145172. baloghadamsoftware added a comment. Typo fixed. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/ExceptionEscapeCheck.cpp clang-tidy/bugprone/

[PATCH] D46406: [docs] Fix typos in the Clang User's Manual.

2018-05-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Thanks! Repository: rC Clang https://reviews.llvm.org/D46406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: docs/clang-tidy/checks/bugprone-exception-escape.rst:8-9 +* Destructors +* Copy constructors +* Copy assignment operators +* The ``main()`` functions dberri

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 145174. baloghadamsoftware marked an inline comment as done. baloghadamsoftware added a comment. New test added. https://reviews.llvm.org/D33537 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-04 Thread Elena Demikhovsky via Phabricator via cfe-commits
delena added a comment. In https://reviews.llvm.org/D46386#1087533, @Anastasia wrote: > Is this some sort of a vendor extension then? OpenCL 1.2 atomic builtins > don't have ordering parameter. OpenCL 1.2 atomic builtins have relaxed semantics. Always, it is not parameter, it is defined behav

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-05-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D45931#1087007, @lebedev.ri wrote: > In https://reviews.llvm.org/D45931#1086665, @alexfh wrote: > > > In https://reviews.llvm.org/D45931#1084503, @lebedev.ri wrote: > > > > > In https://reviews.llvm.org/D45931#1083192, @lebedev.ri wrote: > > > >

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This approach generally looks good to me, but I'd like @rsmith's opinion on whether we should be trying to make -ast-print have good source fidelity or not. I was under the impression we wanted -ast-print to faithfully reproduce code at least as a low priority des

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D45702#1086802, @shuaiwang wrote: > In https://reviews.llvm.org/D45702#1086250, @aaron.ballman wrote: > > > In https://reviews.llvm.org/D45702#1085890, @shuaiwang wrote: > > > > > In https://reviews.llvm.org/D45702#1085224, @aaron.ballman

[PATCH] D45679: [clang-tidy] Add ExprMutationAnalyzer, that analyzes whether an expression is mutated within a statement.

2018-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:88 + +const Stmt *ExprMutationAnalyzer::findDirectMutation(const Expr *Exp) { + // LHS of any assignment operators. JonasToth wrote: > shuaiwang wrote: > > aaron.ballman w

[PATCH] D45944: Disallow pointers to const in __sync_fetch_and_xxx

2018-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, efriedma. aaron.ballman added a comment. Adding a few more potential reviewers. https://reviews.llvm.org/D45944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-05-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D38845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delay Repository: rC Clang https://reviews.llvm.org/D45815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45815: [libclang] Allow skipping function bodies in preamble only

2018-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:104 + enum class SkipFunctionBodiesScope { None, MainFileAndPreamble, Preamble }; + Maybe move this out of `ASTUnit`? Would allow removing the first qualifier in usages outside

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D46431 Files: include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists

[PATCH] D44387: [x86] Introduce the pconfig/encl[u|s|v] intrinsics

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella added a comment. Here is a variation on this, using inline asm: https://reviews.llvm.org/D46431 https://reviews.llvm.org/D44387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 145187. baloghadamsoftware added a comment. Fixed according to the comments. https://reviews.llvm.org/D35110 Files: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp test/Analysis/constraint_manager_negate_difference.c test/Analysis/ptr-ar

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-05-04 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 2 inline comments as done. baloghadamsoftware added a comment. I chose option 1 for now. https://reviews.llvm.org/D35110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

r331519 - [Coroutines] Catch exceptions in await_resume

2018-05-04 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Fri May 4 07:02:37 2018 New Revision: 331519 URL: http://llvm.org/viewvc/llvm-project?rev=331519&view=rev Log: [Coroutines] Catch exceptions in await_resume Summary: http://wg21.link/P0664r2 section "Evolution/Core Issues 24" describes a proposed change to Coroutines TS t

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-04 Thread Brian Gesiak via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331519: [Coroutines] Catch exceptions in await_resume (authored by modocache, committed by ). Changed prior to commit: https://reviews.llvm.org/D45860?vs=144961&id=145188#toc Repository: rC Clang ht

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-04 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Thanks again for all the reviews, @GorNishanov! Very much appreciated. Comment at: lib/CodeGen/CGCoroutine.cpp:220 CGF.EmitBlock(ReadyBlock); + CXXTryStmt *TryStmt = nullptr; + if (Coro.ExceptionHandler && Kind == AwaitKind::Init) { -

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 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. Thank you for the updates. A few more comments. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:150 + } else if (const auto *Try = dyn_cast(St)) { +au

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-04 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:154-155 + if (const auto *TD = ThrownType->getAsTagDecl()) { +if (TD->getDeclName().isIdentifier() && TD->getName() == "bad_alloc") + return Results; + } ---

[PATCH] D46393: Remove explicit cfg-temporary-dtors=true

2018-05-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46393#1086887, @NoQ wrote: > Thanks! > > Just curious - did these flags bother you? Cause we never really care about > cleaning up run lines after flipping the flag, so we have a lot of such stale > flags in our tests. We could start cleaning

[PATCH] D46393: Remove explicit cfg-temporary-dtors=true

2018-05-04 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331520: Remove explicit cfg-temporary-dtors=true (authored by alexfh, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D46393 Files: cfe/trunk/te

r331520 - Remove explicit cfg-temporary-dtors=true

2018-05-04 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Fri May 4 07:13:14 2018 New Revision: 331520 URL: http://llvm.org/viewvc/llvm-project?rev=331520&view=rev Log: Remove explicit cfg-temporary-dtors=true Summary: Remove explicit -analyzer-config cfg-temporary-dtors=true in analyzer tests, since this option defaults to true si

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry for the delay. I really like the direction of this patch! What's left is defining the semantics of corrections more thoroughly to make sure we don't have tricky corner cases that users of the API can't deal with. PS. This patch is still lacking full context o

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. I somehow missed the review email, sorry for the delayed response. Just one nit and one question from me on changed behavior in the tests (quoted vs angled #include). Otherwise LG, just wanted to make sure the change in behavior is intentional.

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-04 Thread Felix Bruns via Phabricator via cfe-commits
fxb updated this revision to Diff 145196. fxb added a comment. 1. Fixed the compile error caused by re-using the name `ShowIncludesDestination`. The member variable is now named `ShowIncludesDest`. 2. Fixed `test/Frontend/print-header-includes.c` to test both cases: - If only `--show-includes`

[PATCH] D46435: [x86] Introduce the encl[u|s|v] intrinsics

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella created this revision. GBuella added reviewers: craig.topper, zvi. Herald added subscribers: cfe-commits, mgorny. Repository: rC Clang https://reviews.llvm.org/D46435 Files: lib/Headers/CMakeLists.txt lib/Headers/module.modulemap lib/Headers/sgxintrin.h lib/Headers/x86intrin.h

[PATCH] D46421: [analyzer][CrossTU] Extend CTU to VarDecls with initializer

2018-05-04 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Rafael! I like the change. Comment at: lib/CrossTU/CrossTranslationUnit.cpp:276 + ASTImporter &Importer = getOrCreateASTImporter(D->getASTContext()); + auto *ToDecl = cast(Importer.Import(const_cast(D))); + assert(HasDefinition(ToDecl)); ---

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-04 Thread Gabor Buella via Phabricator via cfe-commits
GBuella updated this revision to Diff 145207. https://reviews.llvm.org/D46431 Files: include/clang/Driver/Options.td lib/Basic/Targets/X86.cpp lib/Basic/Targets/X86.h lib/Headers/CMakeLists.txt lib/Headers/cpuid.h lib/Headers/module.modulemap lib/Headers/pconfigintrin.h lib/Header

r331533 - [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-04 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri May 4 08:58:31 2018 New Revision: 331533 URL: http://llvm.org/viewvc/llvm-project?rev=331533&view=rev Log: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P This replicates 'cl.exe' behavior and allows for both preprocessor output a

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-04 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 145210. ioeric marked an inline comment as done. ioeric added a comment. - Addressed review comment. Repository: rC Clang https://reviews.llvm.org/D46180 Files: lib/Format/Format.cpp unittests/Format/CleanupTest.cpp Index: unittests/Format/CleanupTes

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-04 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Thanks. I just need someone to push it, as I don't have write access to the repo. https://reviews.llvm.org/D36610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

r331536 - [NFC]Convert Class to use member initialization instead of inline.

2018-05-04 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Fri May 4 09:19:53 2018 New Revision: 331536 URL: http://llvm.org/viewvc/llvm-project?rev=331536&view=rev Log: [NFC]Convert Class to use member initialization instead of inline. Modified: cfe/trunk/include/clang/Frontend/DependencyOutputOptions.h Modified: cfe/trunk

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added inline comments. This revision is now accepted and ready to land. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222 + [MatchedDecl](std::string const &s) { +auto Acronym = llvm:

[PATCH] D46439: Fix incorrect packed aligned structure layout

2018-05-04 Thread Momchil Velikov via Phabricator via cfe-commits
chill created this revision. chill added reviewers: rsmith, aaron.ballman. Executing the following program #include #include struct S { char x; int y; } __attribute__((packed, aligned(8))); struct alignas(8) T { char x; int y; } __attribute__((packed)); in

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[clang-tools-extra] r331539 - [clang-doc] Attaching a name to reference data

2018-05-04 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri May 4 10:02:13 2018 New Revision: 331539 URL: http://llvm.org/viewvc/llvm-project?rev=331539&view=rev Log: [clang-doc] Attaching a name to reference data This adds the name of the referenced decl, in addition to its USR, to the saved data, so that the backend can l

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-05-04 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. Could you run the check on llvm sources and post a summary of results here? A few more inline comments. Comment at: clang-tidy/bugprone/InfiniteLoopCheck.cpp:102 +

[PATCH] D46281: [clang-doc] Attaching a name to reference data

2018-05-04 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. juliehockett marked 2 inline comments as done. Closed by commit rL331539: [clang-doc] Attaching a name to reference data (authored by juliehockett, committed by ). Herald added subscribers: llvm-commits, klimek. Changed pri

Re: [PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-04 Thread Sterling Augustine via cfe-commits
I applied this to a clean local copy, which has no other changes, and have the following test error, which may be pilot error on my part, but nevertheless, this test needs to be robust to changes in the line number. llvm-svn/llvm/tools/clang/unittests/Tooling/QualTypeNamesTest.cpp:39: Failure Valu

[PATCH] D46439: Fix incorrect packed aligned structure layout

2018-05-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Test? Repository: rC Clang https://reviews.llvm.org/D46439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-04 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331533: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP… (authored by erichkeane, committed by ). Repository: rC Clang https://reviews.llvm.org/D46394 Files: include/cl

[PATCH] D44435: CUDA ctor/dtor Module-Unique Symbol Name

2018-05-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Perhaps we should take a step back and consider whether this is the right approach to solve your problem. If I understand it correctly, the real issue is that you repeatedly recompile the same module and cling will only use the function from the first module it's seen it i

[PATCH] D45944: Disallow pointers to const in __sync_fetch_and_xxx

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM, although you might consider testing a broader set of builtins. Maybe at least one from the `__atomic_*` family? https://reviews.llvm.org/D45944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-04 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev created this revision. AntonBikineev added reviewers: rsmith, aaron.ballman. AntonBikineev added a project: clang. The patch addresses this bug . According to the Standard (taken from the bug description): [class.ctor] paragraph 14: "Dur

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. So, this makes sense to me, but on x86, should we also be worried about the fact that the calling convention is based on which features are available? (>128bit ext_vector_types are passed in AVX/AVX-512 registers, if available). Presumably swift is also affected, no? Rep

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-04 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. Makes sense to me. Repository: rC Clang https://reviews.llvm.org/D46441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45476#1087487, @EricWF wrote: > In https://reviews.llvm.org/D45476#1087446, @cfe-commits wrote: > > > I think you and Richard agreed that you weren’t going to synthesize a whole > > expression tree at every use of the operator, and I agree w

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-04 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. There doesn't seem to be a simple way to remove it from the ClangTidyOptions class, as a lot more functions need to be changed to support that. I would prefer to leave it there for now, and we can refactor it later. Either way, the check can't be set from a config file.

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-04 Thread Steve Canon via Phabricator via cfe-commits
scanon added a comment. In https://reviews.llvm.org/D46042#1088044, @ab wrote: > So, this makes sense to me, but on x86, should we also be worried about the > fact that the calling convention is based on which features are available? > (>128bit ext_vector_types are passed in AVX/AVX-512 regist

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1086732, @aaron.ballman wrote: > If the static analyzer people desire this feature, that would sway my > position on it, but it sounds like they're hesitant as well. > However, I don't think clang-tidy is beholden either -- if we don't

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Please add a test. Repository: rC Clang https://reviews.llvm.org/D46441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Test cases? Repository: rC Clang https://reviews.llvm.org/D46441 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r331544 - [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-04 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri May 4 10:55:13 2018 New Revision: 331544 URL: http://llvm.org/viewvc/llvm-project?rev=331544&view=rev Log: [clang-format] Refactor #include insertion/deletion functionality into a class. Summary: The class will be moved into libToolingCore as followup. The new behaviors

[PATCH] D46180: [clang-format] Refactor #include insertion/deletion functionality into a class.

2018-05-04 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331544: [clang-format] Refactor #include insertion/deletion functionality into a class. (authored by ioeric, committed by ). Changed prior to commit: https://reviews.llvm.org/D46180?vs=145210&id=145225#

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D46042#1088044, @ab wrote: > So, this makes sense to me, but on x86, should we also be worried about the > fact that the calling convention is based on which features are available? > (>128bit ext_vector_types are passed in AVX/AVX-512 regi

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D46042#1088049, @scanon wrote: > In https://reviews.llvm.org/D46042#1088044, @ab wrote: > > > So, this makes sense to me, but on x86, should we also be worried about the > > fact that the calling convention is based on which features are avai

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 145226. Wizard added a comment. optimize matching Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46374 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp test/clang-tidy/objc-property-declaration-custom.m test/clang-tidy/objc-property

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Yan Zhang via Phabricator via cfe-commits
Wizard marked an inline comment as done. Wizard added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222 + [MatchedDecl](std::string const &s) { +auto Acronym = llvm::Regex("^" + s + "$"); +retur

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Yan Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Wizard marked an inline comment as done. Closed by commit rL331545: Add support for ObjC property name to be a single acronym. (authored by Wizard, committed by ). Herald added a subscriber: llvm-commits. Repository: rL L

[clang-tools-extra] r331545 - Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Yan Zhang via cfe-commits
Author: wizard Date: Fri May 4 11:14:08 2018 New Revision: 331545 URL: http://llvm.org/viewvc/llvm-project?rev=331545&view=rev Log: Add support for ObjC property name to be a single acronym. Summary: This change will support cases like: ``` @property(assign, nonatomic) int ID; ``` Reviewers: b

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-04 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 145229. pfultz2 added a comment. Moved flag for alpha checks to the ClangTidyContext https://reviews.llvm.org/D46159 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/ClangTidyDiagnosticConsumer.cpp clang-tidy/ClangTidyDiagnosticCons

[PATCH] D46435: [x86] Introduce the encl[u|s|v] intrinsics

2018-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D46435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D46431: [x86] Introduce the pconfig intrinsic

2018-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D46431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D46443: Add missing cstdalign header

2018-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 created this revision. Herald added subscribers: cfe-commits, christof, aheejin. Repository: rCXX libc++ https://reviews.llvm.org/D46443 Files: include/cassert include/cstdalign test/libcxx/min_max_macros.sh.cpp test/libcxx/utilities/any/size_and_alignment.pass.cpp Index: test

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Caroline Tice via Phabricator via cfe-commits
cmtice updated this revision to Diff 145243. cmtice added a comment. Updated the error to only occur for CFI blacklist, and added test case. https://reviews.llvm.org/D46403 Files: lib/Driver/SanitizerArgs.cpp test/Driver/fsanitize-blacklist.c Index: test/Driver/fsanitize-blacklist.c =

[PATCH] D46443: Add missing cstdalign header

2018-05-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 updated this revision to Diff 145247. sbc100 added a comment. - revert Repository: rCXX libc++ https://reviews.llvm.org/D46443 Files: include/cstdalign test/libcxx/min_max_macros.sh.cpp test/libcxx/utilities/any/size_and_alignment.pass.cpp Index: test/libcxx/utilities/any/size

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. OK, As I see it, we have two choices: (1) Stash the expressions in Sema and import them like In https://reviews.llvm.org/D45476#1088047, @rjmccall wrote: > > Ah. If you want to be able to find this thing without a Sema around in order > to > handle deserialized ex

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This is significantly more complexity than we need. We're talking about constexpr variables here, so we just need a `VarDecl* -- you can then ask that declaration for its evaluated value and emit that directly. https://reviews.llvm.org/D45476

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-04 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. Looks good to me. Repository: rL LLVM https://reviews.llvm.org/D46374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46446: [c++17] Fix assertion on synthesizing deduction guides after a fatal error.

2018-05-04 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai created this revision. vsapsai added a reviewer: rsmith. After a fatal error Sema::InstantiatingTemplate doesn't allow further instantiation and doesn't push a CodeSynthesisContext. When we tried to synthesize implicit deduction guides from constructors we hit the assertion > Assertion fa

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/Driver/SanitizerArgs.cpp:118 BlacklistFiles.push_back(Path.str()); +else if (BL.Mask == CFI) + D.Diag(clang::diag::err_drv_no_such_file) << Path; CFI can be enabled with other sanitizers, such as ubsan. I

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/Driver/SanitizerArgs.cpp:118 BlacklistFiles.push_back(Path.str()); +else if (BL.Mask == CFI) + D.Diag(clang::diag::err_drv_no_such_file) << Path; vsk wrote: > CFI can be enabled with other sanitizers, suc

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45476#1088180, @EricWF wrote: > OK, As I see it, we have two choices: > > (1) Stash the expressions in Sema and import them like > > In https://reviews.llvm.org/D45476#1088047, @rjmccall wrote: > > > I'm sorry, but this is just not true. The

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45476#1088189, @rsmith wrote: > This is significantly more complexity than we need. We're talking about > constexpr variables here, so we just need a `VarDecl* -- you can then ask > that declaration for its evaluated value and emit that dir

[PATCH] D46439: Fix incorrect packed aligned structure layout

2018-05-04 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This looks fine, but needs a test. Comment at: lib/Sema/SemaDecl.cpp:15576 +// Handle attributes before checking for alignas underalignment. +if (Attr) More generally: "before checking the layout". Comment at

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. One problem with this direction is that clang doesn't ship a cfi blacklist in its default install, so, this leaves cfi users with stock toolchains to fend for themselves. I think it'd be a good idea to ship a basic cfi blacklist in clang's resource dir to avoid inadvertent

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-04 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 145255. mikhail.ramalho added a comment. Fixed the test case. https://reviews.llvm.org/D36610 Files: include/clang/AST/QualTypeNames.h lib/AST/QualTypeNames.cpp unittests/Tooling/QualTypeNamesTest.cpp Index: unittests/Tooling/QualTypeNamesTe

[PATCH] D46415: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers.

2018-05-04 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 145260. NoQ added a comment. Fix test names. Add one more test, just to make sure it works. https://reviews.llvm.org/D46415 Files: lib/StaticAnalyzer/Core/Store.cpp test/Analysis/casts.c Index: test/Analysis/casts.c ===

r331552 - Allow modifying the PrintingPolicy for fully qualified names.

2018-05-04 Thread Sterling Augustine via cfe-commits
Author: saugustine Date: Fri May 4 13:12:39 2018 New Revision: 331552 URL: http://llvm.org/viewvc/llvm-project?rev=331552&view=rev Log: Allow modifying the PrintingPolicy for fully qualified names. Author: mikhail.rama...@gmail.com Modified: cfe/trunk/include/clang/AST/QualTypeNames.h

Re: [PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-04 Thread Sterling Augustine via cfe-commits
Committed as r331552. On Fri, May 4, 2018 at 12:43 PM, Mikhail Ramalho via Phabricator < revi...@reviews.llvm.org> wrote: > mikhail.ramalho updated this revision to Diff 145255. > mikhail.ramalho added a comment. > > Fixed the test case. > > > https://reviews.llvm.org/D36610 > > Files: > includ

  1   2   >