[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:154 + if (const auto *MemberPointerT = Type->getAs()) { +auto Pos = UserWrittenType.find("::"); +if (Pos != std::string::npos) { // might be hidden behind typedef etc

[PATCH] D27520: [clang-tidy] Add check for redundant function pointer dereferences

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289524: [clang-tidy] Add check for redundant function pointer dereferences (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D27520?vs=80642&id=81190#toc Repository: rL

[clang-tools-extra] r289524 - [clang-tidy] Add check for redundant function pointer dereferences

2016-12-13 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Tue Dec 13 02:04:11 2016 New Revision: 289524 URL: http://llvm.org/viewvc/llvm-project?rev=289524&view=rev Log: [clang-tidy] Add check for redundant function pointer dereferences Reviewers: alexfh, aaron.ballman, hokein Subscribers: mgorny, JDevlieghere, cfe-commits

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 81193. JonasToth marked 2 inline comments as done. JonasToth added a comment. last fixes in the code, from alex Repository: rL LLVM https://reviews.llvm.org/D26167 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppC

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I did run clang-tidy with $(./run-clang-tidy.py -checks=-*,cppcoreguidelines-no-malloc). The resulting output is in the appended file. Since all warnings came from header files (llvms custom containers?) there are always the same warnings for all source files. Every f

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. First round of comments. Comment at: clang-move/ClangMove.cpp:492 + isDefinition(), unless(InMovedClass), InOldCC, + anyOf(isStaticStorageClass(), hasParent(namespaceDecl(isAnonymous(); + auto HelperFuncOrVar = namedDecl(anyOf(functionDecl

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-12-13 Thread Peter Szecsi via Phabricator via cfe-commits
szepet added a comment. What is your opinion about the new results? I hope the checker can make it into 4.0. https://reviews.llvm.org/D22507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

r289525 - clang-format: Improve braced-list detection.

2016-12-13 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Dec 13 04:05:03 2016 New Revision: 289525 URL: http://llvm.org/viewvc/llvm-project?rev=289525&view=rev Log: clang-format: Improve braced-list detection. Before: vector v { 12 } GUARDED_BY(mutex); After: vector v{12} GUARDED_BY(mutex); Modified: cfe/trunk/

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:29 + Finder->addMatcher( + callExpr(callee(functionDecl(hasAnyName("::malloc", "::calloc" + .bind("aquisition"), C memory management functions are

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked an inline comment as done. JonasToth added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-no-malloc.rst:10 +See `C++ Core Guidelines +` + --

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked an inline comment as done. JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/NoMallocCheck.cpp:29 + Finder->addMatcher( + callExpr(callee(functionDecl(hasAnyName("::malloc", "::calloc" + .bind("aquisition"),

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 81204. JonasToth added a comment. fix missing variable in doc Repository: rL LLVM https://reviews.llvm.org/D26167 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoregu

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-no-malloc.rst:10 +See `C++ Core Guidelines +` + JonasToth wrote: > malc

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 81208. JonasToth added a comment. adjusted doc. Repository: rL LLVM https://reviews.llvm.org/D26167 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/NoMal

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked 4 inline comments as done. JonasToth added inline comments. Comment at: docs/clang-tidy/checks/cppcoreguidelines-no-malloc.rst:10 +See `C++ Core Guidelines +` + --

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:18 using namespace clang::ast_matchers; +using namespace clang::tidy::utils; + I don't think it is required Comment at: clang-tidy/utils/ExprSequence.cpp:180-182 +

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:18 using namespace clang::ast_matchers; +using namespace clang::tidy::utils; + Prazek wrote: > I don't think it is required ok I guess I am wrong https://reviews.llvm.org/D27700

r289531 - clang-format: Keep string-literal-label + value pairs on a line.

2016-12-13 Thread Daniel Jasper via cfe-commits
Author: djasper Date: Tue Dec 13 05:16:42 2016 New Revision: 289531 URL: http://llvm.org/viewvc/llvm-project?rev=289531&view=rev Log: clang-format: Keep string-literal-label + value pairs on a line. We have previously done that for <<-operators. This patch also adds this logic for "," and "+". B

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-12-13 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:899 +case UO_AddrOf: { + // Process pointer-to-member address operation + const Expr *Ex = U->getSubExpr()->IgnoreParens(); dcoughlin wrote: > Just sticking this

[PATCH] D27199: [libcxx] Make std::ignore constexpr

2016-12-13 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment. In https://reviews.llvm.org/D27199#619278, @EricWF wrote: > @AntonBikineev Do you need somebody to commit this for you? oh, yeah, it would be great. I don't have commit privileges. https://reviews.llvm.org/D27199 __

[PATCH] D26830: [libcxx] Add string_view literals

2016-12-13 Thread Anton Bikineev via Phabricator via cfe-commits
AntonBikineev added a comment. In https://reviews.llvm.org/D26830#619340, @EricWF wrote: > Please ping this once the Clang changes have been accepted. I'm just waiting > on those to give this the final OK. I don't have commit privileges to Clang either, so that patch is stuck. Could you commi

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-12-13 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngineC.cpp:899 +case UO_AddrOf: { + // Process pointer-to-member address operation + const Expr *Ex = U->getSubExpr()->IgnoreParens(); kromanenkov wrote: > dcoughlin wrote:

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-13 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. In https://reviews.llvm.org/D27621#620464, @rsmith wrote: > Please add a test to make sure this does not fire on C++17 decomposition > declarations: > > void f() { > struct X { int a, b, c; }; > auto [a, b, c] = X(); > } Done. Thanks! https://reviews.llv

[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2016-12-13 Thread Ben Harper via Phabricator via cfe-commits
bmharper updated this revision to Diff 81213. bmharper added a comment. Sorry for the incredibly long turnaround time on this one - I don't have any legitimate excuse, and I know it just makes reviewing it harder. Anyway - I have sorted out all the issues mentioned in the last review. One thing

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-13 Thread Firat Kasmis via Phabricator via cfe-commits
firolino marked an inline comment as done. firolino added inline comments. Comment at: clang-tidy/readability/OneNamePerDeclarationCheck.cpp:154 + if (const auto *MemberPointerT = Type->getAs()) { +auto Pos = UserWrittenType.find("::"); +if (Pos != std::string::npos) { /

[PATCH] D27710: [analyzer] Prohibit ExplodedGraph's edges duplicating

2016-12-13 Thread Ilya Palachev via Phabricator via cfe-commits
ilya-palachev created this revision. ilya-palachev added reviewers: NoQ, zaks.anna, dcoughlin. ilya-palachev added subscribers: cfe-commits, a.sidorin, ilya-palachev. ilya-palachev set the repository for this revision to rL LLVM. Current implementation doesn't take care about the duplicates in edg

[PATCH] D27710: [analyzer] Prohibit ExplodedGraph's edges duplicating

2016-12-13 Thread Ilya Palachev via Phabricator via cfe-commits
ilya-palachev removed rL LLVM as the repository for this revision. ilya-palachev updated this revision to Diff 81221. ilya-palachev added a comment. Fixed a typo https://reviews.llvm.org/D27710 Files: lib/StaticAnalyzer/Core/CoreEngine.cpp lib/StaticAnalyzer/Core/ExplodedGraph.cpp Index:

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:154 +return SyntheticStmtSourceMap.lookup(S); + else +return S; nit: No `else` after return, please. https://reviews.llvm.org/D27700

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-13 Thread Egor Churaev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289535: [OpenCL] Enable unroll hint for OpenCL 1.x. (authored by echuraev). Changed prior to commit: https://reviews.llvm.org/D27453?vs=80547&id=81223#toc Repository: rL LLVM https://reviews.llvm.or

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG, but please wait until Malcolm > Whats not nice is, that there is no underlining (in test neither), but i > could not find out what is wrong, > since i supply a SourceRange in the diag()-c

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Hit "submit" too early. LG, but please wait until Malcolm is happy with the change as well. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

[PATCH] D25660: [Analyzer] Checker for iterators dereferenced beyond their range.

2016-12-13 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 81224. baloghadamsoftware added a comment. Now isInStdNamespace is used. Hack is back so https://reviews.llvm.org/D27202 is not a dependency now. https://reviews.llvm.org/D25660 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/St

[PATCH] D24933: Enable configuration files in clang

2016-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 81227. sepavloff added a comment. Addressed review notes. https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/clang/Driver/Driver.h lib/Driver/Drive

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG with one nit. Comment at: clang-tools-extra/clang-tidy/performance/TypePromotionInMathFnCheck.cpp:145-153 + bool StdFnRequresCpp11 = + llvm::StringSwitch(OldFnName)

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:154 +return SyntheticStmtSourceMap.lookup(S); + else +return S; alexfh wrote: > nit: No `else` after return, please. Not sure if he should change it in this patch - it is just mo

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. LG with one nit. Feel free to ping earlier next time. Comment at: clang-tidy/misc/SuspiciousEnumUsageCheck.cpp:170-171 + if (const auto *EnumExpr = Result.Nodes.getNodeAs("enumExpr")) { +if (!StrictMode) + return; +const auto *EnumDec = Res

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons accepted this revision. malcolm.parsons added a comment. LGTM. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24933: Enable configuration files in clang

2016-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: include/clang/Driver/Driver.h:287 + const std::string &getConfigFile() const { return ConfigFile; } + void setConfigFile(StringRef x, unsigned N) { +ConfigFile = x; bruno wrote: > x -> FileName Fixed. =

[PATCH] D22507: Clang-tidy - Enum misuse check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SuspiciousEnumUsageCheck.cpp:155 + +if (EnumDec->enumerator_begin() == EnumDec->enumerator_end() || +OtherEnumDec->enumerator_begin() == OtherEnumDec->enumerator_end()) szepet wrote: > alexfh w

[PATCH] D21298: [Clang-tidy] delete null check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/readability/DeleteNullPointerCheck.cpp:52 + + auto D = diag( + IfWithDelete->getLocStart(), Rename `D` to `Diag`,

[PATCH] D27713: [clang-move] Fix incorrect EndLoc for declarations in macros.

2016-12-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. hokein added a subscriber: cfe-commits. https://reviews.llvm.org/D27713 Files: clang-move/ClangMove.cpp unittests/clang-move/ClangMoveTests.cpp Index: unittests/clang-move/ClangMoveTests.cpp =

[PATCH] D27713: [clang-move] Fix incorrect EndLoc for declarations in macros.

2016-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. Lg https://reviews.llvm.org/D27713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/misc/StringCompareCheck.cpp:48 +diag(Matched->getLocStart(), + "do not use compare to test equality of strings; " + "

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:154 +return SyntheticStmtSourceMap.lookup(S); + else +return S; Prazek wrote: > alexfh wrote: > > nit: No `else` after return, please. > Not sure if he should change it in this p

[PATCH] D27284: [ClangTidy] Add new performance-type-promotion-in-math-fn check.

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27284#609937, @Eugene.Zelenko wrote: > Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). This has not been done. https://reviews.llvm.org/D27284 ___ cfe-commi

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Jakub Staroń via Phabricator via cfe-commits
staronj added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:52 + +bool isDescendantOrEqual(const Stmt *Descendant, const Stmt *Ancestor, + ASTContext *Context) { Shouldn't isDescendantOrEqual be static or in inline namespa

[PATCH] D26796: [Driver] Use arch type to find compiler-rt libraries (on Linux)

2016-12-13 Thread Renato Golin via Phabricator via cfe-commits
rengolin resigned from this revision. rengolin removed a reviewer: rengolin. rengolin added a comment. I don't know enough about the x86 environment to be able to review this patch. Sorry. https://reviews.llvm.org/D26796 ___ cfe-commits mailing lis

[clang-tools-extra] r289541 - [clang-move] Fix incorrect EndLoc for declarations in macros.

2016-12-13 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Dec 13 09:35:47 2016 New Revision: 289541 URL: http://llvm.org/viewvc/llvm-project?rev=289541&view=rev Log: [clang-move] Fix incorrect EndLoc for declarations in macros. Reviewers: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27713 M

[PATCH] D27713: [clang-move] Fix incorrect EndLoc for declarations in macros.

2016-12-13 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289541: [clang-move] Fix incorrect EndLoc for declarations in macros. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D27713?vs=81231&id=81234#toc Repository: rL LLVM https:/

[PATCH] D27700: [clang-tidy] refactor ExprSequence out of misc-use-after-move check

2016-12-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:52 + +bool isDescendantOrEqual(const Stmt *Descendant, const Stmt *Ancestor, + ASTContext *Context) { staronj wrote: > Shouldn't isDescendantOrEqual be static or i

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-13 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D27166#617696, @malcolm.parsons wrote: > In https://reviews.llvm.org/D27166#617621, @Prazek wrote:. > > > Does it work for cases like? > > > Yes; `replaceExpr()` checks that the variable has the same unqualified type > as the initializer and th

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:21 + +static StringRef getValueInit(const CXXCtorInitializer *Init) { + switch (Init->getInit()->getType()->getScalarTypeKind()) { The function name doesn't make it clea

[clang-tools-extra] r289542 - Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs, getDeclAs}

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:19:19 2016 New Revision: 289542 URL: http://llvm.org/viewvc/llvm-project?rev=289542&view=rev Log: Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} Modified: clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.

r289543 - Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs, getDeclAs}

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:19:34 2016 New Revision: 289543 URL: http://llvm.org/viewvc/llvm-project?rev=289543&view=rev Log: Remove deprecated methods ast_matchers::BoundNodes::{getStmtAs,getDeclAs} Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h cfe/trunk/lib/Tooling/

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Jonas, do you need someone to commit the patch for you? Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r289544 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-12-13 Thread Neil Hickey via cfe-commits
Author: neil.hickey Date: Tue Dec 13 10:22:50 2016 New Revision: 289544 URL: http://llvm.org/viewvc/llvm-project?rev=289544&view=rev Log: Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64. This change makes sure single-precision floati

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. tbh. i dont know anything how the clang workflow works :) do i need to ask someone to commit, or what be my next step? Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D24235: [OpenCL] Improve floating point literal handling

2016-12-13 Thread Neil Hickey via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289544: Improve handling of floating point literals in OpenCL to only use double… (authored by neil.hickey). Changed prior to commit: https://reviews.llvm.org/D24235?vs=77975&id=81235#toc Repository:

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D26167#621106, @alexfh wrote: > Jonas, do you need someone to commit the patch for you? i think so, yes. can i trigger somehow automatically, that this will go into the code base somehow? Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Sema/Overload.h:754 +unsigned NumInlineBytesUsed; +llvm::AlignedCharArray InlineSpace; I guess you could use "void *" instead of ImplicitConversionSequence for the alignment to make it cl

RE: r286815 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-12-13 Thread Neil Hickey via cfe-commits
I looked into this, and for C, clang converts the literal to inf in the first case. OpenCL spec doesn't mention anything different so I presume the behaviour should match Cs behaviour, which is does with this change. More exhaustive tests could be implemented to ensure this though. Neil >

[PATCH] D27187: [clang-tidy] Do not move parameter if only DeclRefExpr occurs inside of a loop

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG modulo comment. Comment at: clang-tidy/utils/DeclRefExprUtils.cpp:127 + match(findAll(declRefExpr(equalsNode(&DeclRef), +unless(hasAnc

[clang-tools-extra] r289546 - [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:38:18 2016 New Revision: 289546 URL: http://llvm.org/viewvc/llvm-project?rev=289546&view=rev Log: [Clang-tidy] check for malloc, realloc and free calls Summary: This checker flags the use of C-style memory management functionality and notes about modern alterna

[clang-tools-extra] r289547 - Remove trailing whitespace in docs and clang-tidy sources.

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:38:45 2016 New Revision: 289547 URL: http://llvm.org/viewvc/llvm-project?rev=289547&view=rev Log: Remove trailing whitespace in docs and clang-tidy sources. Modified: clang-tools-extra/trunk/clang-tidy/modernize/LoopConvertCheck.cpp clang-tools-extra/tru

[PATCH] D26750: [clang-tidy] Add modernize-use-default-member-init check

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons planned changes to this revision. malcolm.parsons added inline comments. Comment at: clang-tidy/modernize/UseDefaultMemberInitCheck.cpp:21 + +static StringRef getValueInit(const CXXCtorInitializer *Init) { + switch (Init->getInit()->getType()->getScalarTypeKind()

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8081 + /// \brief Set current OpenCL extensions for a type which can only be used + /// when these OpenCL extensions are enabled. If current OpenCL Extsion is + /// empty, do nothing. Extsi

[clang-tools-extra] r289549 - Fix sphinx build.

2016-12-13 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Dec 13 10:49:10 2016 New Revision: 289549 URL: http://llvm.org/viewvc/llvm-project?rev=289549&view=rev Log: Fix sphinx build. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-no-malloc.rst Modified: clang-tools-extra/trunk/docs/clang-tidy/

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Committed in r289546. Repository: rL LLVM https://reviews.llvm.org/D26167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r289552 - Fixing build failure by adding triple option to new test condition.

2016-12-13 Thread Neil Hickey via cfe-commits
Author: neil.hickey Date: Tue Dec 13 11:04:33 2016 New Revision: 289552 URL: http://llvm.org/viewvc/llvm-project?rev=289552&view=rev Log: Fixing build failure by adding triple option to new test condition. Adding -triple option to ensure target supports double for fpmath test. Modified: cfe

r289553 - Update for clang after llvm::StringLiteral.

2016-12-13 Thread Zachary Turner via cfe-commits
Author: zturner Date: Tue Dec 13 11:10:16 2016 New Revision: 289553 URL: http://llvm.org/viewvc/llvm-project?rev=289553&view=rev Log: Update for clang after llvm::StringLiteral. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp URL: http://llvm.org/

[PATCH] D27717: [analyzer] Suppress a leak false positive in Qt's QObject::connectImpl()

2016-12-13 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: zaks.anna, dcoughlin, xazax.hun, a.sidorin. NoQ added a subscriber: cfe-commits. A quick fix to address the false positive posted by Tiago Macarios in the mailing lists: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051738.html MallocChecke

r289554 - [analyzer] Detect ObjC properties that are both (copy) and Mutable.

2016-12-13 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Tue Dec 13 11:19:18 2016 New Revision: 289554 URL: http://llvm.org/viewvc/llvm-project?rev=289554&view=rev Log: [analyzer] Detect ObjC properties that are both (copy) and Mutable. When an Objective-C property has a (copy) attribute, the default setter for this property per

[PATCH] D27535: [analyzer] Add ObjCPropertyChecker - check for autosynthesized copy-properties of mutable types.

2016-12-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289554: [analyzer] Detect ObjC properties that are both (copy) and Mutable. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D27535?vs=81083&id=81240#toc Repository: rL LLVM

[PATCH] D27717: [analyzer] Suppress a leak false positive in Qt's QObject::connectImpl()

2016-12-13 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2577 if (FName == "postEvent" && FD->getQualifiedNameAsString() == "QCoreApplication

[PATCH] D27655: Fix modernize-deprecated-headers clang-tidy warnings

2016-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Yes, IWYU is useful tool, but please note that it's not ideal, so will be good idea to check proposed changes manually. You could build IWYU in-tree with Clang or Clang extra tools. https://reviews.llvm.org/D27655 _

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/misc-string-compare.rst:12 +zero depending on the lexicographical relationship between the strings compared. +If an equality or inequality check can suffice, that is recommended. + alexfh

r289567 - __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Dec 13 12:58:09 2016 New Revision: 289567 URL: http://llvm.org/viewvc/llvm-project?rev=289567&view=rev Log: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types Although not specifically mentioned in the documentation, MSVC accepts __uuidof(…) and decl

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. FYI I had to make a few changes so that we still error out on __uuid in C mode. Repository: rL LLVM https://reviews.llvm.org/D26846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D26846: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types

2016-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289567: __uuidof() and declspec(uuid("...")) should be allowed on enumeration types (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D26846?vs=78569&id=81258#toc Repository: rL LL

[PATCH] D27424: Add the diagnose_if attribute to clang.

2016-12-13 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 81259. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed alignment comment. Thanks! (Late parsing is still to-be-done) https://reviews.llvm.org/D27424 Files: include/clang/Basic/Attr.td include/cl

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Mads Ravn via Phabricator via cfe-commits
madsravn updated this revision to Diff 81260. madsravn added a comment. Updated matcher. Made fixits for some cases Updated the documentation. https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringCompareCheck.cpp

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Mark Lodato via Phabricator via cfe-commits
lodato resigned from this revision. lodato removed a reviewer: lodato. lodato added a comment. I know nothing about the C++ code. I only know the git-clang-format script. https://reviews.llvm.org/D27377 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 81264. pcc added a comment. - Address review comments https://reviews.llvm.org/D22296 Files: clang/include/clang/AST/VTableBuilder.h clang/include/clang/Basic/LLVM.h clang/lib/AST/VTableBuilder.cpp clang/lib/CodeGen/CGCXX.cpp clang/lib/CodeGen/CGVTT.c

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 3 inline comments as done. pcc added inline comments. Comment at: clang/include/clang/AST/VTableBuilder.h:255 +operator ArrayRef() const { return {data(), size()}; }; + }; + rjmccall wrote: > Maybe this ought to be in LLVM as OwnedArrayRef? And t

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:297 case tok::kw_default: + if (Style.Language != FormatStyle::LK_Java || !Line->MustBeDeclaration) { +if (!SwitchLabelEncountered && Same as below.

r289571 - [Sema] Prefer SmallVector over `new`ed memory blocks. NFC.

2016-12-13 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Tue Dec 13 13:22:56 2016 New Revision: 289571 URL: http://llvm.org/viewvc/llvm-project?rev=289571&view=rev Log: [Sema] Prefer SmallVector over `new`ed memory blocks. NFC. Modified: cfe/trunk/lib/Sema/SemaOverload.cpp Modified: cfe/trunk/lib/Sema/SemaOverload.cpp URL: http

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 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, thanks! https://reviews.llvm.org/D22296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

Re: r289413 - Add two new AST nodes to represent initialization of an array in terms of

2016-12-13 Thread Reid Kleckner via cfe-commits
Aha, you have activated the win32 stack alignment trap card. By adding a uint64_t to EvalInfo, you have increased its alignment to 8. Unfortunately, MSVC doesn't actually align stack objects to more than 4 unless you really ask it to with __declspec(align). Normally this stuff flies under the radar

[PATCH] D25263: [Driver] Allow setting the default linker during build

2016-12-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 81276. phosek marked 3 inline comments as done. Repository: rL LLVM https://reviews.llvm.org/D25263 Files: CMakeLists.txt include/clang/Config/config.h.cmake include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp lib

r289575 - Align EvalInfo in ExprConstant to avoid PointerUnion assertions

2016-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Dec 13 13:48:32 2016 New Revision: 289575 URL: http://llvm.org/viewvc/llvm-project?rev=289575&view=rev Log: Align EvalInfo in ExprConstant to avoid PointerUnion assertions 32-bit MSVC doesn't provide more than 4 byte stack alignment by default. This conflicts with PointerUni

Re: r289544 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-12-13 Thread Tom Stellard via cfe-commits
On Tue, Dec 13, 2016 at 04:22:50PM -, Neil Hickey via cfe-commits wrote: > Author: neil.hickey > Date: Tue Dec 13 10:22:50 2016 > New Revision: 289544 > > URL: http://llvm.org/viewvc/llvm-project?rev=289544&view=rev > Log: > Improve handling of floating point literals in OpenCL to only use dou

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Luis Héctor Chávez via Phabricator via cfe-commits
lhchavez updated this revision to Diff 81280. lhchavez added a comment. Addressed feedback https://reviews.llvm.org/D27377 Files: lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTestJava.cpp Index: unittests/Format/FormatTestJava.cpp =

[PATCH] D27377: clang-format: Support the Java 8 'default' method modifier

2016-12-13 Thread Luis Héctor Chávez via Phabricator via cfe-commits
lhchavez marked 3 inline comments as done. lhchavez added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:870 +} +// 'default' can appear in a Java 8 declaration. Parse it as such. +break; djasper wrote: > Is there a test case that hit

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-13 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. Do the fixits work when the object is a pointer to a string? `pstr1->compare(str2) == 0` Does the warning work when the argument is a pointer to a string? `str1.compare(*pstr2) == 0` Does the warning work when the argument is the result of a function call? Does the

[PATCH] D26167: [Clang-tidy] check for malloc, realloc and free calls

2016-12-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. nit: All of the new files had UTF-8 BOMs, which I don't think we usually add. Comment at: test/clang-tidy/cppcoreguidelines-no-malloc.cpp:3 + +using size_t = unsigned long; + This test did not pass on 32-bit Windows. I will change it to:

[clang-tools-extra] r289580 - Fix size_t typdef in new cppcoreguidelines-no-malloc.cpp test

2016-12-13 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Dec 13 14:25:47 2016 New Revision: 289580 URL: http://llvm.org/viewvc/llvm-project?rev=289580&view=rev Log: Fix size_t typdef in new cppcoreguidelines-no-malloc.cpp test Modified: clang-tools-extra/trunk/test/clang-tidy/cppcoreguidelines-no-malloc.cpp Modified: clang-t

[clang-tools-extra] r289581 - [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64le

2016-12-13 Thread Bill Seurer via cfe-commits
Author: seurer Date: Tue Dec 13 14:26:35 2016 New Revision: 289581 URL: http://llvm.org/viewvc/llvm-project?rev=289581&view=rev Log: [powerpc] deactivate readability-identifier-naming.cpp test on powerpc64le The test case clang-tidy/readability-identifier-naming.cpp segfaults on powerpc64 little

[PATCH] D27680: [CodeGen] Move lifetime.start of a variable when goto jumps back past its declaration

2016-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 81284. ahatanak added a comment. Address review comment. Use llvm::is_contained instead of std::find. https://reviews.llvm.org/D27680 Files: lib/CodeGen/CGDecl.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CGStmt.cpp lib/CodeGen/CodeGenFunction.h test/C

[PATCH] D27726: [analyzer] Refer to macro names in diagnostics for macros representing a literal

2016-12-13 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna created this revision. zaks.anna added reviewers: dergachev.a, dcoughlin. zaks.anna added a subscriber: cfe-commits. When a macro expending to a literal is used in a comparison, use the macro name in the diagnostic rather than the literal. This improves readability of path notes. Adde

[PATCH] D22296: CodeGen: New vtable group representation: struct of vtable arrays.

2016-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. pcc marked an inline comment as done. Closed by commit rL289584: CodeGen: New vtable group representation: struct of vtable arrays. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D22296?vs=81264&id=8

  1   2   >