[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: > > rjmccal

[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 us

[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, a

[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: https://reviews.llvm.org/D55378?

[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 so

[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 http://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 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 exclu

[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] 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 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 concatenatio

[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 https://reviews.llvm.org/D55382/ne

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 diverg

[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))); // exp

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&view=rev Log: [analyzer] Fix an infinite recursion bug while checking parent methods in RetainCountChecker Differential Revision: https://reviews.llvm.org/D55351 Modi

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&view=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 consum

[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: https:/

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&view=rev Log: [analyzer] Rely on os_consumes_this attribute to signify that the method call consumes a reference for "this" Differential Revision: https://reviews.llvm

[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: htt

[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: test/Analysis/use-after-move.cp

[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 it

[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}} + // expected-warning@../Inputs/system-header-simulator-cxx.

[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 cfe-comm

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&view=rev Log: [frontend][darwin] warn_stdlibcxx_not_found: supress warning for preprocessed input Addresses second post-commit feedback for r335081 from Nico Modified: cf

[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 test/Anal

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&view=rev Log: Use relative line offsets in test Modified: cfe/trunk/test/AST/dump.cpp Modified: cfe/trunk/test/AST/dump.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/t

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&view=rev Log: Make test resistant to line numbers changing I

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 '-s

[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 Pt

[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 p

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&view=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: http://llvm.org/vi

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&view=rev Log: Add test for ObjC generics Modified: cfe/t

[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 test/AST/ast-dump-funcs.c

[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] 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 =

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&view=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-comm

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&view=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 handlin

[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&id=177073#toc Repository: rC Clang CHANGES SINC

[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&id=177074#toc Repository: rC Clang CHANGES SINC

[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 w

[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/ https://r

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&view=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: http://llvm.org/viewvc/llvm-pro

[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: lib/AS

[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 this

[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 regist

[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 &C, const CallExpr *CE) const; + void evalExplicitBzero(CheckerContext &C, const CallExpr *CE) const; I guess let's do just `evalBzero`?

[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 think

[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 `NoReturnFunction

[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, 6

[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: clang/cmake/cac

[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] 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 `compile_commands.

[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] 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 clang-ti

[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 to

[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] 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 clang-tidy/abseil/AnonymousEnclosedAliasesCheck.

[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 nam

[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] 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 https://reviews.llvm.org/

[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: clang/test/Sem

<    1   2