[PATCH] D64120: Rebase onto current master

2019-07-02 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 abandoned this revision. gamesh411 added a comment. Missed arcanist diff. Disregard this revision. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64120/new/ https://reviews.llvm.org/D64120 ___ cfe-commits ma

[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

2019-07-02 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 207711. gamesh411 added a comment. Rebase onto current master Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59798/new/ https://reviews.llvm.org/D59798 Files: include/clang/CrossTU/CrossTranslationUnit.h include/clang/S

[PATCH] D64120: Rebase onto current master

2019-07-02 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D64120 Files: include/clang/CrossTU/CrossTranslationUnit.h include/clang/StaticAnalyzer/

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: clang-tools-extra/clangd/index/Serialization.cpp:531 +for (llvm::StringRef C : Cmd.CommandLine) + Result.Cmd->CommandLine.emplace_back(C.str()); + } nit: push_back, or emplac

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207708. MaskRay added a comment. Check -malign-double Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td

[PATCH] D64119: [PowerPC] Support constraint code "ww"

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, hfinkel, jsji, kbarton, nemanjai. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. "ww" and "ws" are both constraint codes for VSX vector registers that holds scalar double

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. Can you please add a test ensuring that -malign-double and -mlong-double-64 interact properly? I think that, in the current patch, they do (as -malign-double is processed first), but I'd prefer that we cover that case explicitly. Repository: rC Clang CHANGES SINCE

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-07-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @rsmith Just ping, could you take a look at the clang change? If possible, could you share your opinion? Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61809/new/ https://reviews.llvm.org/D61809 __

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-07-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 207704. yonghong-song added a comment. handle unnamed bitfield properly. these struct/union members are not encoded in debuginfo, so skip them during preserve_*_access_index IR intrinsics generation. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:210 ///the default tag for the checker will be used. + /// @param IsPrunable Whether the note is prunable. ExplodedNode * It makes p

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package is for checkers that model APIs. These checkers are +// always turned on; this package is intended for API modeling that is not +// controlled by

[PATCH] D64015: [WIP][CUDA] Use shared MangleContext for CUDA and CXX CG

2019-07-02 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin resigned from this revision. aheejin added a comment. Sorry, I don't think I know enough about this code to review this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64015/new/ https://reviews.llvm.org/D64015 __

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207703. Charusso marked 10 inline comments as done. Charusso added a comment. - Fix. - Refactor. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers

[PATCH] D62888: [NewPM] Port Sancov

2019-07-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:750 Constant::getNullValue(ArrayTy), "__sancov_gen_"); + appendToCompilerUsed(*CurModule, {Array}); chandlerc wrote: > There is a `GlobalsToAppendTo

[PATCH] D62888: [NewPM] Port Sancov

2019-07-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 207698. leonardchan marked 5 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207695. MaskRay edited the summary of this revision. MaskRay added a comment. Implement this in TargetInfo::adjust as rnk suggested Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Fil

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64100#1567715 , @Charusso wrote: > Sometimes I was lost in the amount of your work. Nah, i literally just pushed it. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64100/new/ https://reviews.llvm.

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64100#1567706 , @NoQ wrote: > In D64100#1567230 , @Charusso wrote: > > > Nice! Could you add some `#===---===#` separators, please? As it is in the > > finishing state, I think now it

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64100#1567230 , @Charusso wrote: > Nice! Could you add some `#===---===#` separators, please? As it is in the > finishing state, I think now it is appropriate. rC364991 . Repository: rL LLV

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364992: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364990: [analyzer] exploded-graph-rewriter: Collapse very long statement pretty-prints. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Chang

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364989: [analyzer] exploded-graph-rewriter: Implement checker messages. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 207687. NoQ added a comment. Fix the `dump_egraph.c` test (whoops). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64110/new/ https://reviews.llvm.org/D64110 Files: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp clang/test/Analysis/dump_egraph.c cla

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:3009-3010 for (const BugReport &Report : EQ) { -if (Report.getErrorNode()->getState() == N->getState()) +if (Report.getErrorNode()->get

r364992 - [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 2 18:26:41 2019 New Revision: 364992 URL: http://llvm.org/viewvc/llvm-project?rev=364992&view=rev Log: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes. Add a label to nodes that have a bug report attached or on which the analysis was general

r364991 - [analyzer] exploded-graph-rewriter: NFC: Add more comments.

2019-07-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 2 18:26:38 2019 New Revision: 364991 URL: http://llvm.org/viewvc/llvm-project?rev=364991&view=rev Log: [analyzer] exploded-graph-rewriter: NFC: Add more comments. Modified: cfe/trunk/utils/analyzer/exploded-graph-rewriter.py Modified: cfe/trunk/utils/analyzer

r364989 - [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 2 18:26:32 2019 New Revision: 364989 URL: http://llvm.org/viewvc/llvm-project?rev=364989&view=rev Log: [analyzer] exploded-graph-rewriter: Implement checker messages. They are displayed as raw lines and diffed via difflib on a per-checker basis. Differential Revi

r364990 - [analyzer] exploded-graph-rewriter: Collapse very long statement pretty-prints.

2019-07-02 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Jul 2 18:26:35 2019 New Revision: 364990 URL: http://llvm.org/viewvc/llvm-project?rev=364990&view=rev Log: [analyzer] exploded-graph-rewriter: Collapse very long statement pretty-prints. When printing various statements that include braces (compound statements, lambda

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:107 + + // If the invariant is broken we do not return the concrete value. +if (IsInvariantBreak) Something's wrong with formatting. C

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:228-229 /// a bug, you can add notes as you add your transitions. - const NoteTag *getNoteTag(NoteTag::Callback &&Cb) { -return Eng.getNoteTags().makeNoteTag(std

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I'd love to chip in later, if you don't mind, but here is just a couple things that caught my mind that I'd like to share before falling asleep ;) Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:98-100 +// The APIModeling package

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:120 +<< (Value ? "true" : "false") +<< " according to the LLVM coding standard, but it returns " +<< (Value ? "false" : "true"); --

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 207668. Charusso marked 7 inline comments as done. Charusso added a comment. - Create `FunctionExitPoint` diagnostics. - Fix. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63915/new/ https://reviews.llvm.org/D63915 Files: clang/include/clang/Sta

[PATCH] D64098: [NFC][clang] Refactor getCompilationPhases step 1: Move list of phases into Types.def table.

2019-07-02 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 207659. plotfi marked 4 inline comments as done. plotfi added a comment. Update diff based on @compnerd's feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64098/new/ https://reviews.llvm.org/D64098 Files:

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64110#1567505 , @NoQ wrote: > A non-sink node may have no successors because it ran out of statements to > execute (i.e., the analysis finishes successfully). Ah, of course, sorry. > P.S. I don't have many more plans on im

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Sink node is not the same thing as "zero successors". A sink node is a node in which termination was explictly requested as part of modeling, which is usually nice to know. A non-sink node may have no successors because it ran out of statements to execute (i.e., the analysi

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I have removed that `is_sink` business because we have an actual graph, not just a huge painting, so you could mark whether it is sink by it has zero successors. I like the idea about refa

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. F9450610: Screen Shot 2019-07-02 at 4.07.00 PM.png Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64110/new/ https://reviews.llvm.org/D64110 ___ cfe-commits ma

[PATCH] D64110: [analyzer] exploded-graph-rewriter: Implement bug nodes and sink nodes.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added a reviewer: Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. Add a label to nodes that have a bug report attached or on which the a

[PATCH] D64073: [ASTImporter] Fix import of lambda in function param

2019-07-02 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hello Gabor, There is an inline question about tests; other code looks fine. Comment at: clang/lib/AST/ASTImporter.cpp:1713 +// In case of lambdas, the class already has a definition ptr set, but +// the contained decls are not import

[PATCH] D64075: [ASTImporter] Fix structural eq of lambdas

2019-07-02 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hello Gabor, This looks mostly good but I have a question inline. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1182 + if (D1CXX->isLambda()) { +if (!D2CXX->isLambda()) Should we return false if `D1CXX->isLambd

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-07-02 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 207644. yonghong-song edited the summary of this revision. yonghong-song added a comment. change `void *__builtin_preserve_access_index(void *)` to `const void * _builtin_preserve_access_index(const void *)`. Repository: rC Clang CHANGES SINCE LAST

[PATCH] D62329: [ASTImporter] Structural eq: handle DependentScopeDeclRefExpr

2019-07-02 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added inline comments. Comment at: cfe/trunk/lib/AST/ASTStructuralEquivalence.cpp:173 +DE2->getQualifier()); + } else if (auto CastE1 = dyn_cast(E1)) { +auto *CastE2 = dyn_cast(E2); Hi Gabor, Is there any test fo

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D64104#1567326 , @NoQ wrote: > In D64104#1567317 , @Charusso wrote: > > > I like it! What about `BlockEdge` with the long terminators? (c.f. > > `Edge.getSrc()->printTerminatorJson()`)

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D64104#1567317 , @Charusso wrote: > I like it! What about `BlockEdge` with the long terminators? (c.f. > `Edge.getSrc()->printTerminatorJson()`) We don't process these yet >.< But it should be trivial to cover them in a similar

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. I like it! What about `BlockEdge` with the long terminators? (c.f. `Edge.getSrc()->printTerminatorJson()`) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64

[PATCH] D64104: [analyzer] exploded-graph-rewriter: Collapse large statement pretty-prints.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added a reviewer: Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. When printing various statements that include braces (compound stateme

[PATCH] D64098: [NFC][clang] Refactor getCompilationPhases step 1: Move list of phases into Types.def table.

2019-07-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/Driver/Types.cpp:29 + { NAME, FLAGS, TEMP_SUFFIX, TY_##PP_TYPE, PHASES, }, +#define PHASES llvm::SmallVector #include "clang/Driver/Types.def" I think that we can abuse the preprocessor a bit and get somethi

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso accepted this revision. Charusso added a comment. This revision is now accepted and ready to land. Nice! Could you add some `#===---===#` separators, please? As it is in the finishing state, I think now it is appropriate. Repository: rC Clang CHANGES SINCE LAST ACTION https://revi

[PATCH] D64100: [analyzer] exploded-graph-rewriter: Implement checker messages.

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added a reviewer: Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. They are displayed as raw lines and diffed via difflib on a per-checke

[PATCH] D64098: [NFC][clang] Refactor getCompilationPhases step 1: Move list of phases into Types.def table.

2019-07-02 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. The explicit list I think is way better for readability, this is a nice starting point for cleaning this up. Comment at: clang/include/clang/Driver/Types.def:18 // TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS) Please update the com

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-07-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D63082#1564114 , @aaron.ballman wrote: > In D63082#1560667 , @xbolva00 wrote: > > > I wanted to follow GCC’s behaviour -Wall but then dicussion moved to > > “tautological compare group

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-07-02 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 207623. xbolva00 added a comment. Implemented suggested "mul in bool context" diagnostic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63082/new/ https://reviews.llvm.org/D63082 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Bas

[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. This isn't firefox per say but thirdparty apps. If you feel confident, sure, we can land that and see what happens :) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64062/new/ https://reviews.llvm.org/D64062

[PATCH] D64062: Remove both -dumpversion and __VERSION__

2019-07-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. But, based on the github search, I don't think we could reasonably change dumpversion to print 8.0.0, so I'm not sure it really matters. Firefox builds with clang these days, so I'm not sure what they could possibly be using -dumpversion for that would matter. Repository:

[PATCH] D64098: [NFC][clang] Refactor getCompilationPhases step 1: Move list of phases into Types.def table.

2019-07-02 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. plotfi added a reviewer: compnerd. Simplifying the phases generation process, first by copying the phases info into the Table. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64

[PATCH] D63623: [clang-tidy] new check: bugprone-posix-return

2019-07-02 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D63623#1565377 , @gribozavr wrote: > Thanks! Do you have commit access? Do you want me to commit this patch for > you? Totally missed your message yesterday. Sorry about that. I do not have the access so it will be great if y

[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

2019-07-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D64089#1567028 , @danalbert wrote: > > For example, when we're building against the Android NDK, we might want to > > use the NDK's C++ headers (which have a custom inline namespace) even if we > > have C++ headers installed n

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Type.h:1133 + /// Check if this is or contains a non-trivial C struct/union type. + bool hasNonTrivialPrimitiveCStruct() const; You only want these checks to trigger on unions with non-trivial memb

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Sounds good to me. I had a minor suggestion, though. Comment at: lib/Basic/Targets/PPC.cpp:468 Opts.AltiVec = 1; - TargetInfo::adjust(Opts); + if (Opts.LongDoubleSize == 64) { +LongDoubleWidth = LongDoubleAlign = 64; I think it w

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Sure! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62619/new/ https://reviews.llvm.org/D62619 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Can you formally accept then? :) (I'll address inlines before commiting of course!) In D62619#1566693 , @kuhar wrote: > The non-static-analyzer bits look good to me, I added a few nits. Thank you! This part of the project was

[PATCH] D61749: [clang-tidy] initial version of readability-static-const-method

2019-07-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Friendly ping. Are there outstanding concerns that I could address? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61749/new/ https://reviews.llvm.org/D61749 ___ cfe-commits mail

[PATCH] D63954: Add lifetime categories attributes

2019-07-02 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre updated this revision to Diff 207613. mgehre added a comment. - Make the list of attribute properties more consistent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63954/new/ https://reviews.llvm.org/D63954 Files: clang/include/clang/Bas

[PATCH] D63663: [clang-doc] Add html links to references

2019-07-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 207611. DiegoAstiazaran edited the summary of this revision. DiegoAstiazaran added a parent revision: D63857: [clang-doc] Add a structured HTML generator. DiegoAstiazaran added a comment. The links are now generated using the nodes structure introduce

[PATCH] D63911: [clang-doc] Serialize child namespaces and records

2019-07-02 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364963: [clang-doc] Serialize child namespaces and records (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[clang-tools-extra] r364963 - [clang-doc] Serialize child namespaces and records

2019-07-02 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Tue Jul 2 12:59:56 2019 New Revision: 364963 URL: http://llvm.org/viewvc/llvm-project?rev=364963&view=rev Log: [clang-doc] Serialize child namespaces and records Serialization of child namespaces and records is now handled. Namespaces can have child records and child n

[PATCH] D63911: [clang-doc] Serialize child namespaces and records

2019-07-02 Thread Diego Astiazarán via Phabricator via cfe-commits
DiegoAstiazaran updated this revision to Diff 207605. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63911/new/ https://reviews.llvm.org/D63911 Files: clang-tools-extra/clang-doc/Mapper.cpp clang-tools-extra/clang-doc/Serialize.cpp clang-tools-extra/clang-doc/Serialize.h clang-too

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:71 + SVal RetV = Call.getReturnValue(); + Optional RetDV = RetV.getAs(); + if (!RetDV.hasValue()) `auto` is encouraged here. CHANGES SINCE LAST ACTION https://r

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. This is starting to look great, thanks! Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:96 + + Out << '\'' << Name << "' always returns " + << (Value ? "true" : "false"); Let's omit the word "alway

[PATCH] D63915: [analyzer] ReturnValueChecker: Model the guaranteed boolean return value of function calls

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ReturnValueChecker.cpp:86 + std::string Name = ""; + Name += dyn_cast(Call.getDecl())->getParent()->getName(); + Name += "::"; Either `cast<>` or check for null. Commen

[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

2019-07-02 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. > For example, when we're building against the Android NDK, we might want to > use the NDK's C++ headers (which have a custom inline namespace) even if we > have C++ headers installed next to the driver. Since NDK r19 the NDK libc++ headers are already installed along

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:16218 +checkNonTrivialCUnion(E->getType(), E->getExprLoc(), + Sema::NTCUC_LValueToRValueVolatile); + ahatanak wrote: > rjmcca

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked an inline comment as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:16218 +checkNonTrivialCUnion(E->getType(), E->getExprLoc(), + Sema::NTCUC_LValueToRValueVolatile); + rjmccall wrote: > ahatan

[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.

2019-07-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 207600. ahatanak added a comment. Call `hasNonTrivialPrimitiveCStruct` to check whether the type is a non-trivial C struct/union before calling `checkNonTrivialCUnion`. Fix comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D63845: [WIP] Create a clang attribute that lets users specify LLVM attributes

2019-07-02 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D63845#1561983 , @lebedev.ri wrote: > In D63845#1561793 , @jdoerfert wrote: > > > In D63845#1560605 , @aaron.ballman > > wrote: > > > > > In D6

[PATCH] D63503: cmake: Add CLANG_LINK_CLANG_DYLIB option

2019-07-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. One comment inline. Otherwise LGTM. Comment at: clang/CMakeLists.txt:327 +set(CLANG_LINK_CLANG_DYLIB ${LLVM_LINK_LLVM_DYLIB} CACHE BOOL +"Link tools against libclang_shared.so") + We should generate a config error if `LLVM_LINK_LLVM_D

[PATCH] D62825: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

2019-07-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364954: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D62825?vs=206304&id=207596#toc Repository:

r364954 - [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast

2019-07-02 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Tue Jul 2 11:28:13 2019 New Revision: 364954 URL: http://llvm.org/viewvc/llvm-project?rev=364954&view=rev Log: [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast This commit adds a new builtin, __builtin_bit_cast(T, v), which performs a bit_cast from a value v to

[PATCH] D64089: [Driver] Introduce -stdlib++-isystem

2019-07-02 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, phosek, rsmith, zer0. Herald added a subscriber: srhines. Herald added a project: clang. There are times when we wish to explicitly control the C++ standard library search paths used by the driver. For example, when we're building a

[PATCH] D63962: [clang-doc] Fix segfault in comment sorting

2019-07-02 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364949: [clang-doc] Fix segfault in comment sorting (authored by juliehockett, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://rev

[clang-tools-extra] r364949 - [clang-doc] Fix segfault in comment sorting

2019-07-02 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Tue Jul 2 10:57:11 2019 New Revision: 364949 URL: http://llvm.org/viewvc/llvm-project?rev=364949&view=rev Log: [clang-doc] Fix segfault in comment sorting Differential Revision: https://reviews.llvm.org/D63962 Modified: clang-tools-extra/trunk/clang-doc/Representa

[PATCH] D62619: [analyzer][IDF] Add a control dependency calculator + a new debug checker

2019-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Static Analyzer bits look great to me as well! Comment at: clang/include/clang/Analysis/Analyses/Dominators.h:257 + // Dumps immediate control dependencies for each block. + void dump() { +CFG *cfg = PostDomTree.getCFG(); kuhar wrote:

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59254#1566895 , @shawnl wrote: > My point is that most languages these days that intend to be compiled to > machine code want compatibility with the C ABI, and randstruct will be part > of that (and can be made compatible between

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread Shawn Landden via Phabricator via cfe-commits
shawnl added a comment. My point is that most languages these days that intend to be compiled to machine code want compatibility with the C ABI, and randstruct will be part of that (and can be made compatible between languages by sharing the seed). LLVM knows what a struct is. Repository: r

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2019-07-02 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. See PR25683 (https://bugs.llvm.org/show_bug.cgi?id=25683) for more details. The patch posted here differs slightly from what is posted in the PR; `getLocation()` is called instead of `getBeginLoc()` since the latter may return a customized begin location. I believ

[PATCH] D64087: [clang] Correct source locations for instantiations of out-of-line defaulted special member functions. (PR25683)

2019-07-02 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann created this revision. tahonermann added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes PR25683 (https://bugs.llvm.org/show_bug.cgi?id=25683) This change completes adjustments of source locations for FunctionDecl definitions correspond

[PATCH] D63976: Allow clang -Os and -Oz to work with -flto and lld

2019-07-02 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In D63976#1566236 , @ruiu wrote: > I agree with Teresa. I don't think automatically setting O3 > for Os and Oz is a good idea > because these three options are different (that's wh

[PATCH] D43159: Modernize: Use nullptr more.

2019-07-02 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. Herald added a subscriber: dexonsmith. I'm fine with this given what the author said about `nullptr` already being used in those headers. Repository: rCXX libc++ CHANGES SINCE LAST ACTIO

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364938: clang-format: Add new style option AlignConsecutiveMacros (authored by sammccall, committed by ). Herald added a project: LLVM. Changed prior to commit: https://reviews.llvm.org/D28462?vs=192694

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-07-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. It sounds like this is fairly low-risk (it's behind a flag that's off by default), has been approved, and we want it in clang-format 9, so I'm going to rebase and land it. I don't understand the patch in detail so if there is significant fallout I'll have to revert a

[PATCH] D64018: [clangd] Store hash of command line in index shards.

2019-07-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 207578. kadircet marked 3 inline comments as done. kadircet added a comment. - Use an InternedCompileCommand struct rather than a pack of StringRefs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64018/new/ ht

[PATCH] D59254: [RFC] Implementation of Clang randstruct

2019-07-02 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D59254#1566711 , @shawnl wrote: > I think the essential functionality of this patch should be in LLVM and not > Clang, so that all front-ends can benefit. Too many generally useful things > are in Clang when they should be in LLVM

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! I would suggest to wait a day or two before committing just in case John has any feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D62413: [OpenCL][PR41727] Prevent ICE on global dtors

2019-07-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 207574. Anastasia added a comment. Added a target hook to query address spaces with the largest pointer width. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62413/new/ https://reviews.llvm.org/D62413 Files: lib/CodeGen/CGDeclCXX.cpp lib/CodeG

[PATCH] D63538: [analyzer][CFG] Return the correct terminator condition

2019-07-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus planned changes to this revision. Szelethus added a comment. Something's off. `test/Analysis/edges-new.mm` fails, but I don't remember any test failures at home -- I'll investigate. Before this patch: F9448950: image.png After this patch: F9448940: i

[PATCH] D64083: [OpenCL][Sema] Improve address space support for blocks

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini created this revision. mantognini added reviewers: rjmccall, Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. This patch ensures that the following code is compiled identically with -cl-std=CL2.0 and -fblocks -cl-std=c++. kernel void test(void)

[PATCH] D64074: [OpenCL][Sema] Fix builtin rewriting

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini marked an inline comment as done. mantognini added a comment. I added the FIXME and reduced the amount of testing. Let me know if it looks alright. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64074/new/ https://reviews.llvm.org/D64074

r364938 - clang-format: Add new style option AlignConsecutiveMacros

2019-07-02 Thread Sam McCall via cfe-commits
Author: sammccall Date: Tue Jul 2 08:53:14 2019 New Revision: 364938 URL: http://llvm.org/viewvc/llvm-project?rev=364938&view=rev Log: clang-format: Add new style option AlignConsecutiveMacros This option behaves similarly to AlignConsecutiveDeclarations and AlignConsecutiveAssignments, aligning

[PATCH] D64074: [OpenCL][Sema] Fix builtin rewriting

2019-07-02 Thread Marco Antognini via Phabricator via cfe-commits
mantognini updated this revision to Diff 207569. mantognini added a comment. Address comments: reduce testing & add FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64074/new/ https://reviews.llvm.org/D64074 Files: clang/include/clang/Basic/

  1   2   >