[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-06 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Fixes PR39858 Repository: rC Clang https://reviews.llvm.org/D55413 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index:

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Hm. I wonder if it would also make sense to model e.g. the get method to return nullptr for moved from smart ptrs. This could help null dereference checker and also aid false path prunning. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-06 Thread Henry Wong via Phabricator via cfe-commits
MTC accepted this revision. MTC added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Checkers/MoveChecker.cpp:90 // in a valid manner. // TODO: We can still try to identify *unsafe* use after move, such as // dereference

[PATCH] D55411: [clang-tidy] check for flagging using declarations not in the inner most namespace

2018-12-06 Thread Yucheng Wu via Phabricator via cfe-commits
Ywicheng created this revision. Ywicheng added a reviewer: JonasToth. Herald added subscribers: cfe-commits, xazax.hun, mgorny. This patch adds one check corresponding to the Scope of the Alias section in https://abseil.io/tips/119. In particular, it is better to put aliases in the innermost

[PATCH] D55409: [clang-tidy] check for using declarations not in an anonymous namespace when there exists one

2018-12-06 Thread Yucheng Wu via Phabricator via cfe-commits
Ywicheng updated this revision to Diff 177121. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55409/new/ https://reviews.llvm.org/D55409 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/AnonymousEnclosedAliasesCheck.cpp

[PATCH] D55410: [clang-tidy] check for flagging using declarations in headers

2018-12-06 Thread Shyan Akmal via Phabricator via cfe-commits
Naysh created this revision. Naysh added reviewers: EricWF, JonasToth. Herald added subscribers: cfe-commits, xazax.hun, mgorny. This patch adds an "Alias Free Headers" check, based off the guidelines at http://google.github.io/styleguide/cppguide.html#Aliases, to the abseil module. The purpose

[PATCH] D55346: [clang-tidy] check for using declaration qualification

2018-12-06 Thread Shyan Akmal via Phabricator via cfe-commits
Naysh updated this revision to Diff 177116. Naysh retitled this revision from "[clang-tidy] check for using declaration scope and qualification" to "[clang-tidy] check for using declaration qualification". Naysh edited the summary of this revision. Naysh added a comment. Based off the request

[PATCH] D55409: [clang-tidy] check for using declarations not in an anonymous namespace when there exists one

2018-12-06 Thread Yucheng Wu via Phabricator via cfe-commits
Ywicheng updated this revision to Diff 177115. Ywicheng added a comment. Updated abseil-anonymous-enclosed-alises.rst and ReleaseNotes.rst CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55409/new/ https://reviews.llvm.org/D55409 Files: clang-tidy/abseil/AbseilTidyModule.cpp

[PATCH] D55409: [clang-tidy] check for using declarations not in an anonymous namespace when there exists one

2018-12-06 Thread Yucheng Wu via Phabricator via cfe-commits
Ywicheng created this revision. Ywicheng added reviewers: alexfh, hokein, aaron.ballman, astrelni, EricWF, JonasToth. Herald added subscribers: cfe-commits, xazax.hun, mgorny. This patch adds one check corresponding to the Unnamed Namespace section in https://abseil.io/tips/119. In particular,

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54872#1319958 , @ilya-biryukov wrote: > I'm a bit confused now, will put up a few clarifying questions to make sure I > understand the probem properly. > Does `clang-cl` work correctly the arguments from

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D55395#1322244 , @ABataev wrote: > This is wrong, the original implementation is correct and should not be > changed. The original implementation looks pretty clearly wrong to me, but I think this is wrong too. It looks like

[PATCH] D55405: [CMake] Use hidden visibility for static libc++ in Fuchsia

2018-12-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: mcgrathr. Herald added subscribers: cfe-commits, mgorny. Herald added a reviewer: EricWF. This is enables the use of libc++ in contexts such as device drivers. Repository: rC Clang https://reviews.llvm.org/D55405 Files:

[PATCH] D55007: [Analyzer] Constraint Manager - Calculate Effective Range for Differences

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I just generally wish for a function that would return the most specific known range for the given arbitrary symbol. This is something we can put, for example, into visitor path notes. Eg., imagine "Assuming x is greater than 5" -> "Tainted array index constrained to [5,

[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 177080. Szelethus added a comment. This revision is now accepted and ready to land. - Rebased to master. - Adding functions calls with the `noreturn` attribute to the guards. - Shamelessly stole all sorts of assert-like function names from

[PATCH] D54438: [analyzer][WIP] Reimplement dependencies between checkers

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D54438#1322266 , @NoQ wrote: > In D54438#1315953 , @Szelethus wrote: > > > - ✔️ There are in fact a variety of checkers that contain subcheckers like > > `MallocChecker`, which I

[PATCH] D54592: [analyzer][CStringChecker] evaluate explicit_bzero

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:127 void evalMemset(CheckerContext , const CallExpr *CE) const; + void evalExplicitBzero(CheckerContext , const CallExpr *CE) const; I guess let's do just `evalBzero`?

[PATCH] D54438: [analyzer][WIP] Reimplement dependencies between checkers

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D54438#1315953 , @Szelethus wrote: > - ✔️ There are in fact a variety of checkers that contain subcheckers like > `MallocChecker`, which I think is all good, but the concept that if a > subchecker is enabled it only sort of

[PATCH] D53701: [Analyzer] Record and process comparison of symbols instead of iterator positions in interator checkers

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D53701#1318566 , @baloghadamsoftware wrote: > In D53701#1315242 , @NoQ wrote: > > > > > > When using iterator adapters of the STL the bugs may also be filtered out by > the analyzer if

[PATCH] D55398: Re-order content from InitListExpr

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. This causes no change in the output of ast-dump-stmt.cpp due to the way child nodes are printed with a delay. Repository: rC Clang https://reviews.llvm.org/D55398 Files:

r348553 - Add test for InitListExpr

2018-12-06 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Dec 6 16:08:14 2018 New Revision: 348553 URL: http://llvm.org/viewvc/llvm-project?rev=348553=rev Log: Add test for InitListExpr Modified: cfe/trunk/test/AST/ast-dump-stmt.cpp Modified: cfe/trunk/test/AST/ast-dump-stmt.cpp URL:

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev requested changes to this revision. ABataev added a comment. This revision now requires changes to proceed. This is wrong, the original implementation is correct and should not be changed. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55395/new/

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-06 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The usual process for adding / tweaking warnings is to build some large open-source project with the new / tweaked warning and note true and false positive rate. IIRC I did this on Chromium when I added the warning, and the out-of-bounds check prevented false positives

[PATCH] D55339: NFC: Move VisitExpr code to dumpStmt

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348546: NFC: Move VisitExpr code to dumpStmt (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D55339?vs=176870=177074#toc Repository: rC Clang CHANGES SINCE

[PATCH] D55338: NFC: Move VisitStmt code to dumpStmt

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348545: NFC: Move VisitStmt code to dumpStmt (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D55338?vs=176869=177073#toc Repository: rC Clang CHANGES SINCE

r348546 - NFC: Move VisitExpr code to dumpStmt

2018-12-06 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Dec 6 15:33:33 2018 New Revision: 348546 URL: http://llvm.org/viewvc/llvm-project?rev=348546=rev Log: NFC: Move VisitExpr code to dumpStmt Summary: The call is duplicated in the handlers of all Expr subclasses. This change makes it easy to split statement handling

r348545 - NFC: Move VisitStmt code to dumpStmt

2018-12-06 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Dec 6 15:33:27 2018 New Revision: 348545 URL: http://llvm.org/viewvc/llvm-project?rev=348545=rev Log: NFC: Move VisitStmt code to dumpStmt Summary: This call is duplicated in Visits of all direct subclasses of Stmt. Reviewers: aaron.ballman Subscribers: cfe-commits

[PATCH] D55395: Re-order content in OMPDeclareReductionDecl dump

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55395 Files: lib/AST/ASTDumper.cpp test/AST/dump.cpp Index: test/AST/dump.cpp

[PATCH] D55394: Re-order type param children of ObjC nodes

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55394 Files: lib/AST/ASTDumper.cpp test/AST/ast-dump-decl.m Index: test/AST/ast-dump-decl.m

[PATCH] D55393: Re-order content of template parameter dumps

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55393 Files: lib/AST/ASTDumper.cpp test/AST/ast-dump-decl.cpp Index: test/AST/ast-dump-decl.cpp

[PATCH] D55083: Re-arrange content in FunctionDecl dump

2018-12-06 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 177069. steveire added a comment. Adjust tests Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55083/new/ https://reviews.llvm.org/D55083 Files: lib/AST/ASTDumper.cpp test/AST/ast-dump-decl.cpp

Re: r348471 - Add test for ObjC generics

2018-12-06 Thread Stephen Kelly via cfe-commits
On 06/12/2018 12:48, Aaron Ballman wrote: On Thu, Dec 6, 2018 at 4:26 AM Stephen Kelly via cfe-commits wrote: Author: steveire Date: Thu Dec 6 01:23:59 2018 New Revision: 348471 URL: http://llvm.org/viewvc/llvm-project?rev=348471=rev Log: Add test for ObjC generics Modified:

r348543 - Add more expected content to match in test

2018-12-06 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Dec 6 15:23:10 2018 New Revision: 348543 URL: http://llvm.org/viewvc/llvm-project?rev=348543=rev Log: Add more expected content to match in test Modified: cfe/trunk/test/AST/ast-dump-decl.m Modified: cfe/trunk/test/AST/ast-dump-decl.m URL:

[PATCH] D55388: [analyzer] MoveChecker Pt.8: Add checks for dereferencing a smart pointer after move.

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, baloghadamsoftware. Calling `operator*()` or `operator->()` on a null STL smart

[PATCH] D55387: [analyzer] MoveChecker Pt.7: NFC: Misc refactoring.

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, george.karpenkov, szepet, rnkovacs, Szelethus. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, baloghadamsoftware. NoQ added a parent revision: D55307: [analyzer] MoveChecker

Re: r335081 - Recommit r335063: [Darwin] Add a warning for missing include path for libstdc++

2018-12-06 Thread Alex L via cfe-commits
On Fri, 7 Sep 2018 at 12:02, Alex L wrote: > > On Fri, 7 Sep 2018 at 05:41, Nico Weber wrote: > >> On Wed, Sep 5, 2018 at 9:25 PM Alex L wrote: >> >>> Sorry for the late response, >>> >>> On Sat, 18 Aug 2018 at 20:10, Nico Weber wrote: >>> Also, the diag text should probably say "pass

Re: r348469 - Make test resistant to line numbers changing

2018-12-06 Thread Stephen Kelly via cfe-commits
On 06/12/2018 12:45, Aaron Ballman wrote: On Thu, Dec 6, 2018 at 4:25 AM Stephen Kelly via cfe-commits wrote: Author: steveire Date: Thu Dec 6 01:22:12 2018 New Revision: 348469 URL: http://llvm.org/viewvc/llvm-project?rev=348469=rev Log: Make test resistant to line numbers changing I

r348541 - Use relative line offsets in test

2018-12-06 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Dec 6 14:51:51 2018 New Revision: 348541 URL: http://llvm.org/viewvc/llvm-project?rev=348541=rev Log: Use relative line offsets in test Modified: cfe/trunk/test/AST/dump.cpp Modified: cfe/trunk/test/AST/dump.cpp URL:

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 177057. Szelethus added a comment. Woops, forgot to fix the doc of deallocation functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54823/new/ https://reviews.llvm.org/D54823 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp

r348540 - [frontend][darwin] warn_stdlibcxx_not_found: supress warning for preprocessed input

2018-12-06 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Thu Dec 6 14:45:58 2018 New Revision: 348540 URL: http://llvm.org/viewvc/llvm-project?rev=348540=rev Log: [frontend][darwin] warn_stdlibcxx_not_found: supress warning for preprocessed input Addresses second post-commit feedback for r335081 from Nico Modified:

[PATCH] D55289: [analyzer] MoveChecker Pt.5: Improve invalidation policies.

2018-12-06 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. LG! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55289/new/ https://reviews.llvm.org/D55289 ___ cfe-commits mailing list

[PATCH] D55307: [analyzer] MoveChecker Pt.6: Suppress the warning for the few move-safe STL classes.

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 177048. NoQ marked an inline comment as done. NoQ added a comment. Add one more important case: `std::optional`. When moved, it moves the object within it into the new optional, if any. So the object is left in unspecified state, but the state of the optional

[PATCH] D55307: [analyzer] MoveChecker Pt.6: Suppress the warning for the few move-safe STL classes.

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/diagnostics/explicit-suppression.cpp:22 #ifndef SUPPRESSED - // expected-warning@../Inputs/system-header-simulator-cxx.h:670 {{Called C++ object pointer is null}} + //

[PATCH] D55289: [analyzer] MoveChecker Pt.5: Improve invalidation policies.

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 177047. NoQ added a comment. Fxd :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55289/new/ https://reviews.llvm.org/D55289 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp Index:

[PATCH] D55158: [analyzer] Rely on os_consumes_this attribute to signify that the method call consumes a reference for "this"

2018-12-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348533: [analyzer] Rely on os_consumes_this attribute to signify that the method call… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

r348533 - [analyzer] Rely on os_consumes_this attribute to signify that the method call consumes a reference for "this"

2018-12-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Dec 6 14:07:12 2018 New Revision: 348533 URL: http://llvm.org/viewvc/llvm-project?rev=348533=rev Log: [analyzer] Rely on os_consumes_this attribute to signify that the method call consumes a reference for "this" Differential Revision:

[PATCH] D55155: [attributes] Add an attribute "os_consumes_this" with similar semantics to "ns_consumes_self"

2018-12-06 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348532: [attributes] Add an attribute os_consumes_this, with similar semantics to… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

r348532 - [attributes] Add an attribute os_consumes_this, with similar semantics to ns_consumes_self

2018-12-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Dec 6 14:06:59 2018 New Revision: 348532 URL: http://llvm.org/viewvc/llvm-project?rev=348532=rev Log: [attributes] Add an attribute os_consumes_this, with similar semantics to ns_consumes_self The attribute specifies that the call of the C++ method consumes a

r348531 - [analyzer] Fix an infinite recursion bug while checking parent methods in RetainCountChecker

2018-12-06 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Dec 6 14:06:44 2018 New Revision: 348531 URL: http://llvm.org/viewvc/llvm-project?rev=348531=rev Log: [analyzer] Fix an infinite recursion bug while checking parent methods in RetainCountChecker Differential Revision: https://reviews.llvm.org/D55351

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-06 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 aside from two small style nits with the new test file. Comment at: test/SemaCXX/alloc-size.cpp:6 + int alloc(int) __attribute__((alloc_size(2))); //

Re: [cfe-dev] r347339 - [clang][Parse] Diagnose useless null statements / empty init-statements

2018-12-06 Thread Richard Smith via cfe-commits
On Wed, 5 Dec 2018 at 11:14, Alex L via cfe-commits < cfe-commits@lists.llvm.org> wrote: > We have about 100k unique occurrences of this warning across a slice of > our software stack. It's simply not feasible to us to adopt it, so we would > prefer for it to be reverted to avoid downstream

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-06 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner added a comment. Nico: I've added you as reviewer since you originally implemented this warning (thanks for this BTW :) as said, it's really helpful), but feel free to delegate to someone else. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-06 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner added a comment. I found this warning to be really useful but was confused that it is not always triggered. I initially discovered -Wstring-plus-char (and fixed some issues in the projects I work on where sometimes developers didn't realized the "+" wasn't doing to do

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-06 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 177027. arichardson added a comment. Add a C++ test for alloc_size Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td lib/AST/ExprConstant.cpp

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-06 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55382 Files: lib/Sema/SemaExpr.cpp test/SemaCXX/string-plus-int.cpp Index: test/SemaCXX/string-plus-int.cpp

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > In fact -mllvm is used extensively in a lot of lit/FileCheck tests, so that's > also going to cause problems. I count 13 uses of -mllvm in driver commands in-tree, and some of those are actually testing the flag itself. That doesn't seem like a lot. (This is

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. Thanks, LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D55150#1321793 , @jyknight wrote: > In D55150#1321759 , > @george.karpenkov wrote: > > > Using `-Xclang` is the only way to pass options to the static analyzer, I > > don't think we should

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D55150#1321829 , @efriedma wrote: > I'm not sure that putting a warning that can be disabled really helps here; > anyone who needs the option will just disable the warning anyway, and then > users adding additional options

[PATCH] D55378: [compiler-rt] [test] Add missing cmake include for building libFuzzer alone

2018-12-06 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348524: [test] Add missing cmake include for building libFuzzer alone (authored by mgorny, committed by ). Herald added a subscriber: delcypher. Changed prior to commit:

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Kristina Brooks via Phabricator via cfe-commits
kristina requested changes to this revision. kristina added a comment. In D55150#1321829 , @efriedma wrote: > I'm not sure that putting a warning that can be disabled really helps here; > anyone who needs the option will just disable the warning anyway,

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Or actually, if you really want to discourage people from using them, maybe we could use the LLVM version number in the name, like "--unstable-llvm-option-8" (which would change to "--unstable-llvm-option-9" in in 9.0, etc.). This would allow developers to continue

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-06 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added inline comments. Comment at: lib/Index/USRGeneration.cpp:274 +if (unsigned quals = MD->getTypeQualifiers().getCVRUQualifiers()) Out << (char)('0' + quals); switch (MD->getRefQualifier()) { rjmccall wrote: > akyrtzi wrote: > >

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. > Well,, that seems unfortunate if we have the only supported interface for the > static analyzer be an internal interface. Perhaps it can be given a different > option? Even discounting this change, I that seems like it would be > appropriate. Officially

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I'm not sure that putting a warning that can be disabled really helps here; anyone who needs the option will just disable the warning anyway, and then users adding additional options somewhere else in the build system will miss the warning. Instead, it would probably

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D55150#1321759 , @george.karpenkov wrote: > Using `-Xclang` is the only way to pass options to the static analyzer, I > don't think we should warn on it. Well,, that seems unfortunate if we have the only supported

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. In D55150#1321734 , @thakis wrote: > I don't have an opinion on this patch (if you force me to have one, I'm > weakly in favor), but I agree with the general sentiment. When I told people > to not use mllvm and Xclang before,

[PATCH] D55378: [compiler-rt] [test] Add missing cmake include for building libFuzzer alone

2018-12-06 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: phosek, george.karpenkov. Herald added subscribers: Sanitizers, llvm-commits, dberris. Include CompilerRTCompile in fuzzer tests explicitly. Otherwise, when building only libFuzzer, CMake fails due to: CMake Error at

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman requested changes to this revision. arphaman added a comment. Swift uses `-Xclang` to pass in build settings to its own build and to pass in custom options through its Clang importer that we intentionally don't want to expose to Clang's users. We don't want to warn for those uses for

[PATCH] D52956: Support `-fno-visibility-inlines-hidden`

2018-12-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Is this change blocked on something? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52956/new/ https://reviews.llvm.org/D52956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D54401: [analyzer] Prefer returns values to out-params in CheckerRegistry.cpp

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Thanks! I'll commit in a couple days to give some breathing room for anyone who'd object. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54401/new/ https://reviews.llvm.org/D54401 ___ cfe-commits mailing list

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added reviewers: dcoughlin, NoQ. george.karpenkov requested changes to this revision. george.karpenkov added a comment. Using `-Xclang` is the only way to pass options to the static analyzer, I don't think we should warn on it. CHANGES SINCE LAST ACTION

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'm in favor of at least the documentation changes, though I'd like to see them use stronger language. I'm fairly in favor of the warning itself since its easy enough to disable (with the -Wno flag), so I don't terribly understand those against it. CHANGES SINCE

[PATCH] D55377: Allow forwarding -fdebug-compilation-dir to cc1as

2018-12-06 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348515: Allow forwarding -fdebug-compilation-dir to cc1as (authored by nico, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Oh hey, the patch does that already! Ignore me, then :-) That part is probably less controversial, maybe you want to land that while the warning part is being discussed? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55150/new/ https://reviews.llvm.org/D55150

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I don't really see the point of this and think it will just be an inconvenience to llvm developers. Another use case we have for using these in a build system is for the builtin library shipped with the compiler CHANGES SINCE LAST ACTION

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad updated this revision to Diff 177012. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 Files: lib/CodeGen/CGExpr.cpp test/CodeGenOpenCLCXX/address-space-deduction2.cl Index: test/CodeGenOpenCLCXX/address-space-deduction2.cl

r348515 - Allow forwarding -fdebug-compilation-dir to cc1as

2018-12-06 Thread Nico Weber via cfe-commits
Author: nico Date: Thu Dec 6 10:50:39 2018 New Revision: 348515 URL: http://llvm.org/viewvc/llvm-project?rev=348515=rev Log: Allow forwarding -fdebug-compilation-dir to cc1as The flag -fdebug-compilation-dir is useful to make generated .o files independent of the path of the build directory,

[PATCH] D55377: Allow forwarding -fdebug-compilation-dir to cc1as

2018-12-06 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. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55377/new/ https://reviews.llvm.org/D55377 ___ cfe-commits mailing list

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. I don't have an opinion on this patch (if you force me to have one, I'm weakly in favor), but I agree with the general sentiment. When I told people to not use mllvm and Xclang before, they told me "but if I'm not supposed to use them, why are they advertised in

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/UsersManual.rst:3137 -W Enable the specified warning - -XclangPass to the clang compiler + -XclangPass to the clang cc1 frontend. For experimental use only.

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D55150#1321705 , @kristina wrote: > > There is a cost to having people encode these flags into their build > > systems -- it can then cause issues if we ever change these internal flags. > > I do not think any Clang

r348513 - Reapply "Avoid emitting redundant or unusable directories in DIFile metadata entries.""

2018-12-06 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Thu Dec 6 10:44:50 2018 New Revision: 348513 URL: http://llvm.org/viewvc/llvm-project?rev=348513=rev Log: Reapply "Avoid emitting redundant or unusable directories in DIFile metadata entries."" This reverts commit r348280 and reapplies D55085 without modifications.

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:202 std::lock_guard Lock(QueueMu); -Queue.push_back(std::move(T)); +if (Priority == ThreadPriority::Low) { + Queue.push_back(Bind( ilya-biryukov wrote: > Since we might be

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 177007. kadircet marked 2 inline comments as done. kadircet added a comment. - Delete redundant comment Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55315/new/ https://reviews.llvm.org/D55315 Files:

[PATCH] D55150: Emit warnings from the driver for use of -mllvm or -Xclang options.

2018-12-06 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. > There is a cost to having people encode these flags into their build systems > -- it can then cause issues if we ever change these internal flags. I do not > think any Clang maintainer intends to support these as stable APIs, unlike > most of the driver

[PATCH] D55377: Allow forwarding -fdebug-compilation-dir to cc1as

2018-12-06 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. The flag -fdebug-compilation-dir is useful to make generated .o files independent of the path of the build directory, without making the compile command-line dependent on the path of the build directory, like -fdebug-prefix-map

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55262#1321682 , @rjmccall wrote: > Sorry. Can you post the result of passing `-ast-dump` instead of > `-emit-llvm` to the compiler? Actually, nevermind, I don't need that. If you can fix the address-space issue I

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 177005. kadircet added a comment. - Fix a few problems that come up in the field test. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files: clangd/SourceCode.cpp

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Sorry. Can you post the result of passing `-ast-dump` instead of `-emit-llvm` to the compiler? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. Backtrace: F7656050: stack CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42682: [clang-tidy] Add io-functions-misused checker

2018-12-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/IoFunctionsCheck.cpp:32 +has(cxxMemberCallExpr( +on(hasType(namedDecl(hasAnyName("istream", +

[PATCH] D55371: Fix thunks returning memptrs via sret by emitting also scalar return values directly in sret slot (PR39901)

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. That seems reasonable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55371/new/ https://reviews.llvm.org/D55371 ___ cfe-commits

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55262#1321641 , @romanovvlad wrote: > Yes it's 1, but after addrspacecast alignment becomes not struct A but > alignment of the pointer Oh! Yes, that's even more broken than I thought. Comment at:

[PATCH] D54862: [OpenCL] Add generic AS to 'this' pointer

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, but you can probably undo one of my requests. :) Comment at: lib/AST/Type.cpp:2950 + FunctionTypeBits.HasExtQuals = 0; + } } mikael wrote: >

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1087 if (FD->getKind() == Decl::Function) { -initIdentifierInfo(C.getASTContext()); +

[PATCH] D55269: [CUDA] Fix nvidia-cuda-toolkit detection on Ubuntu

2018-12-06 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D55269#1320382 , @tra wrote: > >> Let's start with fixing OpenMP's cmake files. Once it no longer insists on > >> specifying --cuda-path=/usr, and isUbuntu is in place, what is the > >> remaining failure that you see? > > > >

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread Romanov Vlad via Phabricator via cfe-commits
romanovvlad added a comment. Yes it's 1, but after addrspacecast alignment becomes not struct A but alignment of the pointer CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55262/new/ https://reviews.llvm.org/D55262 ___ cfe-commits mailing

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1087 if (FD->getKind() == Decl::Function) { -initIdentifierInfo(C.getASTContext()); +MemFunctionInfo.initIdentifierInfo(C.getASTContext()); IdentifierInfo *FunI =

[PATCH] D55262: [OpenCL] Fix for TBAA information of pointer after addresspacecast

2018-12-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55262#1321048 , @romanovvlad wrote: > I'm getting the same IR for both examples you provided. And for both load of > X value is aligned on 4 bytes wo patch and on 1 byte with. That's odd, because the natural type alignment

[PATCH] D54823: [analyzer][MallocChecker][NFC] Document and reorganize some functions

2018-12-06 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 177002. Szelethus marked 32 inline comments as done. Szelethus added a reviewer: MTC. Szelethus added a comment. Addressing inline comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54823/new/ https://reviews.llvm.org/D54823 Files:

  1   2   >