Re: [libcxx] r258107 - Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262

2016-01-19 Thread Dimitry Andric via cfe-commits
On 19 Jan 2016, at 01:50, Marshall Clow via cfe-commits wrote: > > Author: marshall > Date: Mon Jan 18 18:50:37 2016 > New Revision: 258107 > > URL: http://llvm.org/viewvc/llvm-project?rev=258107&view=rev > Log: > Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as >

Re: [PATCH] D11035: trivial patch, improve constness

2016-01-19 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki added a subscriber: rsmith. danielmarjamaki added a comment. ping.. can somebody review. http://reviews.llvm.org/D11035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 45232. a.sidorin added a comment. Match only FunctionDecls which are definitions and ignore redeclarations without bodies. http://reviews.llvm.org/D16215 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Xiuli PAN via cfe-commits
pxli168 updated the summary for this revision. pxli168 updated this revision to Diff 45234. pxli168 marked 9 inline comments as done. pxli168 added a comment. Fix some small comments problems. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtin

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Xiuli PAN via cfe-commits
pxli168 added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1974 @@ +1973,3 @@ +// Type of the generic packet parameter. +unsigned GenericAS = +getContext().getTargetAddressSpace(LangAS::opencl_generic); Good idea! This can fit different t

[PATCH] D16310: new clang-tidy checker misc-long-cast

2016-01-19 Thread Daniel Marjamäki via cfe-commits
danielmarjamaki created this revision. danielmarjamaki added subscribers: cfe-commits, alexfh. This is a new checker for clang-tidy. This checker will warn when there is a explicit redundant cast of a calculation result to a bigger type. If the intention of the cast is to avoid loss of precision

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Could you please remove the line with printf before committing (see comment above)? Comment at: lib/CodeGen/CGBuiltin.cpp:1976 @@ +1975,3 @@ +getContext()

Re: [PATCH] D16044: getVariableName() for MemRegion

2016-01-19 Thread Alexander Droste via cfe-commits
Alexander_Droste updated this revision to Diff 45239. Alexander_Droste added a comment. - reduce copying - differentiate ER->getIndex().getAs<> cases How about this? http://reviews.llvm.org/D16044 Files: tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h tools/clang/li

Re: [PATCH] D16295: Change of UserLabelPrefix default value from "_" to ""

2016-01-19 Thread Andrey Bokhanko via cfe-commits
andreybokhanko added a comment. @rafael, all these changes are driven by tests. It seems you mean OS targeting, which is handled in other TargetInfo classes (LinuxTargetInfo in Linux case). Comment at: lib/Basic/Targets.cpp:801 @@ -818,2 +800,3 @@ LongDoubleFormat = &llvm

Re: [PATCH] D13285: Fix for bug 24196: clang fails on assertion on complex doubles multiplication when EH is enabled

2016-01-19 Thread Denis Zobnin via cfe-commits
d.zobnin.bugzilla abandoned this revision. d.zobnin.bugzilla added a comment. This issue is fixed in http://reviews.llvm.org/rL253926. http://reviews.llvm.org/D13285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

Re: [PATCH] D16295: Change of UserLabelPrefix default value from "_" to ""

2016-01-19 Thread Rafael Espíndola via cfe-commits
I am pretty sure the cases in init.c are wrong as the assembly itself doesn't use a '_'. Having said that, it is probably a good thing to do this in two steps. So this patch LGTM on the condition that you also open a bug to audit the cases where we define __USER_LABEL_PREFIX__ to _ in init.c and C

r258123 - Fix formatting of fully qualified names in array subscripts.

2016-01-19 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Jan 19 08:05:32 2016 New Revision: 258123 URL: http://llvm.org/viewvc/llvm-project?rev=258123&view=rev Log: Fix formatting of fully qualified names in array subscripts. Before: a[ ::b::c]; After: a[::b::c]; Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp c

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a comment. I would like to see some additional tests to ensure that this does not turn dead code into live code with the fix. e.g., void g(); void f() { return; g(); // This would become live code if return were rem

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/CMakeLists.txt:10 @@ -9,3 +9,2 @@ InaccurateEraseCheck.cpp - InefficientAlgorithmCheck.cpp MacroParenthesesCheck.cpp What about MoveConstantArgumentCheck.cpp? Comment at: cla

Re: [PATCH] D16278: ASTMatcher for ParenExpr node.

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. I have a few small nits that don't require additional review. Comment at: include/clang/ASTMatchers/ASTMatchers.h:1052 @@ +1051,3 @@ +/// \brief Matches

[PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.

2016-01-19 Thread Антон Ярцев via cfe-commits
ayartsev created this revision. ayartsev added a reviewer: zaks.anna. ayartsev added a subscriber: cfe-commits. The patch is a fix for [[ https://llvm.org/bugs/show_bug.cgi?id=23790 | PR23790 ]]. Call to StringRef::Compare() returning [1,0,-1] is replaced with the real call to strcmp to be more

Re: [PATCH] D16286: [clang-tidy] Readability check for redundant parenthesis in return expression.

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a comment. I think this check is a bit too aggressive about suggesting removal of parens. For instance: return (foo && (bar || baz)); It seems reasonable that with more complex subexpressions involving operators of differin

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( alexfh wrote: > aaron.ballman wrote: > > This will break

Re: [PATCH] D8149: Add hasUnderlyingType narrowing matcher for TypedefDecls, functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In http://reviews.llvm.org/D8149#329791, @LegalizeAdulthood wrote: > Is there any reason we can't proceed with the patch as-is and then see if it > can be refactored into an overload of `hasType`? The patch currently includes hasUnderlyingType() which we don't wa

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( alexfh wrote: > alexfh wrote: > > aaron.ballman w

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( aaron.ballman wrote: > This will break projects that ena

Re: [PATCH] D16286: [clang-tidy] Readability check for redundant parenthesis in return expression.

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A high-level comment: why do we want to limit this check to only remove parentheses from `return ()`? Anything wrong with removing unnecessary parentheses everywhere (except for macro bodies)? Comment at: clang-tidy/readability/ReturnWithRedundantParens

r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jan 19 09:15:31 2016 New Revision: 258128 URL: http://llvm.org/viewvc/llvm-project?rev=258128&view=rev Log: Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition. [cpp.cond]p4: Prior to evaluation, macro invocations in the list of preprocessing t

Re: [PATCH] D15866: Warn when using `defined` in a macro definition.

2016-01-19 Thread Nico Weber via cfe-commits
thakis closed this revision. thakis added a comment. r258128 http://reviews.llvm.org/D15866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( aaron.ballman wrote: > alexfh wrote: > > alexfh wrote: >

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 @@ -57,3 +56,1 @@ -CheckFactories.registerCheck( -"misc-inefficient-algorithm"); CheckFactories.registerCheck( alexfh wrote: > aaron.ballman wrote: > > alexfh wrote: >

Re: [PATCH] D15914: [OpenCL] Pipe builtin functions

2016-01-19 Thread Xiuli PAN via cfe-commits
pxli168 updated this revision to Diff 45258. pxli168 added a comment. Remove some debug lines. http://reviews.llvm.org/D15914 Files: include/clang/Basic/Builtins.def include/clang/Basic/Builtins.h include/clang/Basic/DiagnosticSemaKinds.td lib/Basic/Builtins.cpp lib/CodeGen/CGBuiltin.

Re: [PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.

2016-01-19 Thread Artem Dergachev via cfe-commits
NoQ added a subscriber: NoQ. NoQ added a comment. Hmm. If we want to catch bugs resulting from alternative `strcmp()` implementations, then probably a test case that demonstrates the improvement would be worth it, eg.: int x = strcmp("foo", "bar")); if (x == 1 || x == -1) clang_analyzer

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.h:26 @@ +25,3 @@ +/// http://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-return.html +class RedundantReturnCheck : public ClangTidyCheck { +public: aaron.ballma

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Aaron Ballman via cfe-commits
On Tue, Jan 19, 2016 at 10:20 AM, Alexander Kornienko wrote: > alexfh added inline comments. > > > Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 > @@ -57,3 +56,1 @@ > -CheckFactories.registerCheck( > -"misc-inefficient-algorithm"); > CheckFactories.registerChe

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.h:26 @@ +25,3 @@ +/// http://clang.llvm.org/extra/clang-tidy/checks/readability-redundant-return.html +class RedundantReturnCheck : public ClangTidyCheck { +public: alexf

Re: [PATCH] D16308: clang-tidy Enhance readability-simplify-boolean-expr check to handle implicit conversions of integral types to bool and member pointers

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.h:50 @@ -49,3 +49,3 @@ /// opposite condition. /// 4. Implicit conversions of pointer to `bool` are replaced with ex

r258131 - Rename -Wexpansion-to-undefined to -Wexpansion-to-defined.

2016-01-19 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Jan 19 09:32:55 2016 New Revision: 258131 URL: http://llvm.org/viewvc/llvm-project?rev=258131&view=rev Log: Rename -Wexpansion-to-undefined to -Wexpansion-to-defined. Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td cfe/trunk/include/clang/Basic/Diagnosti

Re: [PATCH] D16267: Handle C++11 brace initializers in readability-braces-around-statements

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/BracesAroundStatementsCheck.cpp:63-72 @@ -62,2 +62,12 @@ tok::TokenKind TokKind = getTokenKind(Loc, SM, Context); + // If we are at "}", but the following token is ";", then we could be + // reading a statement

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:3118 @@ -3119,1 +3117,3 @@ +/// \brief Matches a 'for', 'while', 'do while' statement or a function +/// declaration that has a given body. /// s/declaration/definition. ===

Re: r257868 - PR26111: segmentation fault with __attribute__((mode(QI))) on function declaration, by Denis Zobnin

2016-01-19 Thread Aaron Ballman via cfe-commits
On Fri, Jan 15, 2016 at 11:55 AM, Aaron Ballman wrote: > On Fri, Jan 15, 2016 at 11:52 AM, Hans Wennborg via cfe-commits > wrote: >> Should this be merged to 3.8? > > I can't speak to whether it severe enough to warrant it, but I think > that it is sufficiently safe to merge. I lied. This caused

Re: [PATCH] D16301: Allow mode attribute for member variables again

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:891 @@ -891,2 +890,3 @@ + let Subjects = SubjectList<[Var, TypedefName, Field], ErrorDiag, "ExpectedVariableOrTypedef">; let Args = [IdentifierArgument<"Mode">];

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.cpp:36 @@ +35,3 @@ +checkRedundantReturn(Result, Fn); + } else if (const auto *For = Result.Nodes.getNodeAs("for")) { +checkRedundantContinue(Result, dyn_cast(For->getBody())); -

Re: [PATCH] D16262: [libc++] Treat trailing backslashes in a regex pattern as invalid.

2016-01-19 Thread Josh Petrie via cfe-commits
jpetrie added a comment. In http://reviews.llvm.org/D16262#329328, @mclow.lists wrote: > This looks good to me. A quick search for `\\` in regex didn't find any > other obvious instances of this anti-pattern. For the record, the bug is > https://llvm.org/bugs/show_bug.cgi?id=26175 > > Can you

Re: [PATCH] D16113: [clang-tdiy] Add header file extension configuration support.

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/google/GlobalNamesInHeadersCheck.h:26 @@ +25,3 @@ +/// - `HeaderFileExtensions`: a comma-separated list of filename extensions of +/// header files (no need to includ "."). "h" by default. +/// For extension-le

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Alexander Kornienko via cfe-commits
On Tue, Jan 19, 2016 at 4:28 PM, Aaron Ballman wrote: > On Tue, Jan 19, 2016 at 10:20 AM, Alexander Kornienko > wrote: > > alexfh added inline comments. > > > > > > Comment at: clang-tidy/misc/MiscTidyModule.cpp:58 > > @@ -57,3 +56,1 @@ > > -CheckFactories.registerCheck( > >

Re: [PATCH] D12192: Add clang support for AAP

2016-01-19 Thread Edward Jones via cfe-commits
edward-jones updated this revision to Diff 45262. edward-jones added a comment. This updates the Clang support of AAP to top of tree. http://reviews.llvm.org/D12192 Files: lib/Basic/Targets.cpp lib/Driver/Driver.cpp lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h lib/Driver/Tools.cp

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Aaron Ballman via cfe-commits
On Tue, Jan 19, 2016 at 11:06 AM, Alexander Kornienko wrote: > On Tue, Jan 19, 2016 at 4:28 PM, Aaron Ballman > wrote: >> >> On Tue, Jan 19, 2016 at 10:20 AM, Alexander Kornienko >> wrote: >> > alexfh added inline comments. >> > >> > >> > Comment at: clang-tidy/misc/MiscTidyModu

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Aaron Ballman via cfe-commits
On Tue, Jan 19, 2016 at 11:07 AM, Aaron Ballman wrote: > On Tue, Jan 19, 2016 at 11:06 AM, Alexander Kornienko > wrote: >> On Tue, Jan 19, 2016 at 4:28 PM, Aaron Ballman >> wrote: >>> >>> On Tue, Jan 19, 2016 at 10:20 AM, Alexander Kornienko >>> wrote: >>> > alexfh added inline comments. >>> >

[clang-tools-extra] r258133 - [clang-tidy] Python scripts shebang fixes

2016-01-19 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Jan 19 10:10:39 2016 New Revision: 258133 URL: http://llvm.org/viewvc/llvm-project?rev=258133&view=rev Log: [clang-tidy] Python scripts shebang fixes Summary: This patch fixes shebang lines in Python script files. Most Python scripts in LLVM & Clang are using this sheban

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Krzysztof Parzyszek via cfe-commits
This generates hundreds of warnings when doing check-all. Here's the offending code: utils/unittest/googletest/include/gtest/internal/gtest-port.h // Cygwin 1.7 and below doesn't support ::std::wstring. // Solaris' libc++ doesn't support it either. Android has // no support for it at least as

Re: [PATCH] D16270: [clang-tidy] Python scripts shebang fixes

2016-01-19 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258133: [clang-tidy] Python scripts shebang fixes (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D16270?vs=45106&id=45265#toc Repository: rL LLVM http://reviews.llvm.org/D162

Re: [PATCH] D15373: Fix for bug 25786 - Assertion "Chunk.Kind == DeclaratorChunk::Function" failed with regparm attribute.

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. This looks correct to me, but my knowledge of type attributes isn't strong enough to officially sign off, so please wait for @rnk or @rsmith to take a look as well. http://reviews.llvm.org/D15373 ___ cfe-commits mail

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aleksei Sidorin via cfe-commits
a.sidorin updated this revision to Diff 45267. a.sidorin added a comment. Fix issues pointed on review. http://reviews.llvm.org/D16215 Files: docs/LibASTMatchersReference.html include/clang/ASTMatchers/ASTMatchers.h include/clang/ASTMatchers/ASTMatchersInternal.h unittests/ASTMatchers/A

Re: [PATCH] D8149: Add hasUnderlyingType narrowing matcher for TypedefDecls, functionProtoType matcher for FunctionProtoType nodes, extend parameterCountIs to FunctionProtoType nodes

2016-01-19 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: unittests/ASTMatchers/ASTMatchersTest.cpp:4994 @@ +4993,3 @@ + EXPECT_TRUE(matches("typedef int hasUnderlyingTypeTest;", + typedefDecl(hasUnderlyingType(asString("int"); + EXPECT_TRUE(matches("typedef const int T

Re: [PATCH] D16301: Allow mode attribute for member variables again

2016-01-19 Thread Stephan Bergmann via cfe-commits
sberg updated this revision to Diff 45268. sberg added a comment. updated the diagnostic message to mention fields in addition to variables and typedefs http://reviews.llvm.org/D16301 Files: include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Attribu

Re: [PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.

2016-01-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a subscriber: dcoughlin. dcoughlin added a comment. As Artem notes, you can't defer to the host strcmp() -- doing so is just as unsound as using StringRef::compare() less predictable under optimization of the analyzer. I think his suggested approach is the way to go: create a sym

r258140 - Activate OpenMP private clause for target construct and a regression test.

2016-01-19 Thread Carlo Bertolli via cfe-commits
Author: cbertol Date: Tue Jan 19 10:53:55 2016 New Revision: 258140 URL: http://llvm.org/viewvc/llvm-project?rev=258140&view=rev Log: Activate OpenMP private clause for target construct and a regression test. Added: cfe/trunk/test/OpenMP/target_private_messages.cpp Modified: cfe/trunk/inc

Re: [PATCH] D16317: [Analyzer] Fix for PR23790: bind real value returned from strcmp when modelling strcmp.

2016-01-19 Thread Devin Coughlin via cfe-commits
dcoughlin added a comment. ayartsev: > This also may theoretically help to find defects if a tested code relays on a > value returned from strcmp like > if (strcmp(x, y) == 1) { ... } I think it would be useful and not that difficult to write a checker that checks for this explicitly. I don'

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.cpp:24 @@ +23,3 @@ + functionDecl(isDefinition(), returns(asString("void")), + has(compoundStmt(hasAnySubstatement(returnStmt() + .bind("fn"), -

Re: [PATCH] D16308: clang-tidy Enhance readability-simplify-boolean-expr check to handle implicit conversions of integral types to bool and member pointers

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.h:50 @@ -49,3 +49,3 @@ /// opposite condition. /// 4. Implicit conversions of pointer to `bool` are replaced with explicit /// comparisons to `nullptr`.

r258143 - [CMake] Properly respect the CLANG_APPEND_VC_REV option

2016-01-19 Thread Chris Bieneman via cfe-commits
Author: cbieneman Date: Tue Jan 19 11:06:12 2016 New Revision: 258143 URL: http://llvm.org/viewvc/llvm-project?rev=258143&view=rev Log: [CMake] Properly respect the CLANG_APPEND_VC_REV option Only set -DSVN_REVISION if CLANG_APPEND_VC_REV=On Modified: cfe/trunk/CMakeLists.txt Modified: cfe/

Re: r257827 - [CMake] Set SVN_REVISION if CLANG_APPEND_VC_REV=On

2016-01-19 Thread Chris Bieneman via cfe-commits
This was my bad. The two ifs were meant to be wrapped in if(CLANG_APPEND_VC_REV), I’ve added that in r258143. -Chris > On Jan 18, 2016, at 11:40 AM, Craig Topper wrote: > > CLANG_APPEND_VC_REV doesn't appear to be checked anywhere. Were the two ifs > supposed to check it instead of SVN_VERSIO

Re: [libcxx] r258107 - Fix PR#26175. Thanks to Josh Petrie for the report and the patch. Reviewed as http://reviews.llvm.org/D16262

2016-01-19 Thread Hans Wennborg via cfe-commits
On Tue, Jan 19, 2016 at 12:01 AM, Dimitry Andric wrote: > On 19 Jan 2016, at 01:50, Marshall Clow via cfe-commits > wrote: >> >> Author: marshall >> Date: Mon Jan 18 18:50:37 2016 >> New Revision: 258107 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=258107&view=rev >> Log: >> Fix PR#26175.

Re: [libcxxabi] r256323 - Add new tests for throwing incomplete pointer types

2016-01-19 Thread Hans Wennborg via cfe-commits
Nico pointed out his revert should probably be merged to 3.8. Has there been any follow-up here, e.g. fixes, that I should be aware of? Thanks, Hans On Fri, Jan 15, 2016 at 7:48 AM, Nico Weber via cfe-commits wrote: > I reverted this and 322 for now in 257896. > > On Fri, Jan 15, 2016 at 10:36

Re: [libcxxabi] r256323 - Add new tests for throwing incomplete pointer types

2016-01-19 Thread Eric Fiselier via cfe-commits
Hi Hans, Can I have today to work on this? If I can't come up with a fix we can revert tommorow. I'll ping you tommorow with the result. Does that work? /Eric On Tue, Jan 19, 2016 at 10:30 AM, Hans Wennborg wrote: > Nico pointed out his revert should probably be merged to 3.8. > > Has there b

Re: [PATCH] D16158: [CMake] Add clang's targets to LLVM's export set when not building standalone

2016-01-19 Thread Chris Bieneman via cfe-commits
beanz abandoned this revision. beanz added a comment. @hintonda, your comment actually trigged something in my brain and I just realized the problem. It is a much simpler fix. If you set LLVM_ENABLE_PIC=Off libclang isn't built as a dylib, it is a static lib. If LLVM_INSTALL_TOOLCHAIN_ONLY=On,

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantReturnCheck.cpp:24 @@ +23,3 @@ + functionDecl(isDefinition(), returns(asString("void")), + has(compoundStmt(hasAnySubstatement(returnStmt() + .bind("fn"), -

Re: [libcxxabi] r256323 - Add new tests for throwing incomplete pointer types

2016-01-19 Thread Hans Wennborg via cfe-commits
That sounds great. Thanks! On Tue, Jan 19, 2016 at 9:33 AM, Eric Fiselier wrote: > Hi Hans, > > Can I have today to work on this? If I can't come up with a fix we can > revert tommorow. > I'll ping you tommorow with the result. > > Does that work? > > /Eric > > On Tue, Jan 19, 2016 at 10:30 AM, H

Re: [PATCH] D16308: clang-tidy Enhance readability-simplify-boolean-expr check to handle implicit conversions of integral types to bool and member pointers

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.h:50 @@ -49,3 +49,3 @@ /// opposite condition. /// 4. Implicit conversions of pointer to `bool` are replaced with explicit /// comparisons to `nullptr`.

LLVM buildmaster will be restarted tonight

2016-01-19 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 7 PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16301: Allow mode attribute for member variables again

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for fixing this! http://reviews.llvm.org/D16301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D16215: ASTMatchers: enable hasBody() matcher for FunctionDecls

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. With one small nit, LGTM, thanks! Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:1596 @@ +1595,3 @@ +inline const Stmt *GetBodyMatcher::get(const Fu

r258152 - Module Debugging: Defer the emission of anonymous tag decls

2016-01-19 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Tue Jan 19 12:02:47 2016 New Revision: 258152 URL: http://llvm.org/viewvc/llvm-project?rev=258152&view=rev Log: Module Debugging: Defer the emission of anonymous tag decls until we are visiting their declcontext. This fixes a regression introduced in r256962: When building de

Re: [PATCH] D8822: Proposed fix for PR23076 (conditional branch debug line info)

2016-01-19 Thread Adrian Prantl via cfe-commits
aprantl added a subscriber: aprantl. aprantl added a comment. Reposting dblaikie's example hoping that phabricator doesn't mangle it this time: 1: int main() { 2: if ( 3: tr() 4: && 5: tr() 6: ) 7: func(); 8: if ( 9: fa() 10: && 11: tr() 12: ) 13: func(); 14:

Re: [PATCH] D16307: [CUDA] Handle -O options (more) correctly.

2016-01-19 Thread Artem Belevich via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. http://reviews.llvm.org/D16307 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16310: new clang-tidy checker misc-long-cast

2016-01-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: docs/clang-tidy/checks/misc-long-cast.rst:6 @@ +5,3 @@ + +This checker will warn when there is a explicit redundant cast of a calculation +result to a bigger type. If the intention of the cast is to avoid loss of -

Re: [PATCH] D16158: [CMake] Add clang's targets to LLVM's export set when not building standalone

2016-01-19 Thread don hinton via cfe-commits
hintonda added a comment. Ah, great. That is simpler. http://reviews.llvm.org/D16158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-01-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/performance-inefficient-algorithm.rst:3 @@ -2,3 +2,3 @@ -misc-inefficient-algorithm +performance-inefficient-algorithm == alexfh wrote: > After reading this check n

Re: r258110 - Fix PR26134: When substituting into default template arguments, keep CurContext unchanged.

2016-01-19 Thread Dimitry Andric via cfe-commits
Hi Richard, I am unsure if you are specifically the code owner of Sema, but can you please approve this change for the 3.8 branch? -Dimitry > On 19 Jan 2016, at 04:58, Faisal Vali via cfe-commits > wrote: > > Author: faisalv > Date: Mon Jan 18 21:58:55 2016 > New Revision: 258110 > > URL: h

Re: [PATCH] D16261: [CUDA] Only allow __global__ on free functions and static member functions.

2016-01-19 Thread Artem Belevich via cfe-commits
tra added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:6418 @@ +6417,3 @@ +def warn_nvcc_compat_kern_is_method : Warning< + "kernel function %0 is a member function; this may not be accepted by nvcc">, + InGroup; There's an Extension<>

Re: [PATCH] D16310: new clang-tidy checker misc-long-cast

2016-01-19 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Clang-tidy has 6 cast related checks. May be this is good time to introduce dedicated category for them? Repository: rL LLVM http://reviews.llvm.org/D16310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Kim Gräsman via cfe-commits
kimgr added a subscriber: kimgr. kimgr added a comment. Came up with another test case. Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24 @@ +20,6 @@ + +void g(int i) { + if (i < 0) { +return; + } + if (i < 10) { What happens to guard cla

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Evgenii Stepanov via cfe-commits
This broke all WERROR bots. Sounds like this warning should be disabled by default. On Tue, Jan 19, 2016 at 8:15 AM, Krzysztof Parzyszek via cfe-commits wrote: > This generates hundreds of warnings when doing check-all. > > Here's the offending code: > > > utils/unittest/googletest/include/gtest/

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24 @@ +20,6 @@ + +void g(int i) { + if (i < 0) { +return; + } + if (i < 10) { kimgr wrote: > What happens to guard clauses invoking void functions? > >

r258165 - [OpenMP] Parsing + sema for "target enter data" directive.

2016-01-19 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Tue Jan 19 13:15:56 2016 New Revision: 258165 URL: http://llvm.org/viewvc/llvm-project?rev=258165&view=rev Log: [OpenMP] Parsing + sema for "target enter data" directive. Patch by Arpith Jacob. Thanks! Added: cfe/trunk/test/OpenMP/target_enter_data_ast_print.cpp cf

Re: [PATCH] D15989: [OpenMP] Parsing + sema for "target enter data" and "target exit data" directives.

2016-01-19 Thread Samuel Antao via cfe-commits
sfantao closed this revision. sfantao added a comment. Committed revision 258165. Thanks, Samuel http://reviews.llvm.org/D15989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Kim Gräsman via cfe-commits
kimgr added inline comments. Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24 @@ +20,6 @@ + +void g(int i) { + if (i < 0) { +return; + } + if (i < 10) { LegalizeAdulthood wrote: > kimgr wrote: > > What happens to guard clauses invoking voi

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Diego Novillo via cfe-commits
Nico, this is producing tons of warnings on an LLVM build and is actually breaking our internal builds (we build with -Werror). I fixed one file that was producing this, but there are several that have the same problem (e.g., gtest-port.h). Could you fix them or rollback? Thanks. Diego. On Tu

Re: [PATCH] D16286: [clang-tidy] Readability check for redundant parenthesis in return expression.

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added a comment. @alexfh: The check and the bug report originate in the preferences of the google style guide. http://reviews.llvm.org/D16286 ___ cfe-commits mailing list cfe-commits@

Re: [PATCH] D16286: [clang-tidy] Readability check for redundant parenthesis in return expression.

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added a comment. With readability checks, there are always people who disagree about what makes for more readable code. I think I have seen this back-and-forth discussion with **every** readability check since I've been paying attention. It simply isn't possible to make ever

Re: [PATCH] D16310: new clang-tidy checker misc-long-cast

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added a subscriber: LegalizeAdulthood. LegalizeAdulthood added a comment. Why not supply a fixit that removes the cast? Repository: rL LLVM http://reviews.llvm.org/D16310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Richard via cfe-commits
LegalizeAdulthood added inline comments. Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24 @@ +20,6 @@ + +void g(int i) { + if (i < 0) { +return; + } + if (i < 10) { kimgr wrote: > LegalizeAdulthood wrote: > > kimgr wrote: > > > What happen

r258174 - [CUDA] Handle -O options (more) correctly.

2016-01-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Jan 19 13:52:21 2016 New Revision: 258174 URL: http://llvm.org/viewvc/llvm-project?rev=258174&view=rev Log: [CUDA] Handle -O options (more) correctly. Summary: Previously we'd crash the driver if you passed -O0. Now we try to handle all of clang's various optimization fl

Re: [PATCH] D16286: [clang-tidy] Readability check for redundant parenthesis in return expression.

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. In http://reviews.llvm.org/D16286#330360, @LegalizeAdulthood wrote: > With readability checks, there are always people who disagree about what > makes for more readable code. I think I have seen this back-and-forth > discussion with **every** readability check si

Re: [PATCH] D16307: [CUDA] Handle -O options (more) correctly.

2016-01-19 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL258174: [CUDA] Handle -O options (more) correctly. (authored by jlebar). Changed prior to commit: http://reviews.llvm.org/D16307?vs=45223&id=45290#toc Repository: rL LLVM http://reviews.llvm.org/D16

Re: [PATCH] D16259: Add clang-tidy readability-redundant-return check

2016-01-19 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/readability-redundant-return.cpp:21-24 @@ +20,6 @@ + +void g(int i) { + if (i < 0) { +return; + } + if (i < 10) { LegalizeAdulthood wrote: > kimgr wrote: > > LegalizeAdulthood wrote: > > > kim

Re: [PATCH] D15699: [cfi] Cross-DSO CFI diagnostic mode (clang part)

2016-01-19 Thread Evgeniy Stepanov via cfe-commits
eugenis updated this revision to Diff 45292. Repository: rL LLVM http://reviews.llvm.org/D15699 Files: lib/CodeGen/CGClass.cpp lib/CodeGen/CGExpr.cpp lib/CodeGen/CodeGenFunction.h lib/CodeGen/CodeGenModule.cpp lib/Driver/Tools.cpp test/CodeGen/cfi-check-fail.c test/CodeGen/cfi-ic

r258177 - [OpenMP] Parsing + sema for "target exit data" directive.

2016-01-19 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Tue Jan 19 14:04:50 2016 New Revision: 258177 URL: http://llvm.org/viewvc/llvm-project?rev=258177&view=rev Log: [OpenMP] Parsing + sema for "target exit data" directive. Patch by Arpith Jacob. Thanks! Added: cfe/trunk/test/OpenMP/target_exit_data_ast_print.cpp cfe/t

Re: [PATCH] D16279: [OpenMP] Parsing + sema for "target exit data" directive.

2016-01-19 Thread Samuel Antao via cfe-commits
sfantao closed this revision. sfantao added a comment. Committed revision 258177. Thanks, Samuel http://reviews.llvm.org/D16279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Nico Weber via cfe-commits
I'll take a look. If it's urgent it's also possible to disable this warning. On Jan 19, 2016 2:29 PM, "Diego Novillo via cfe-commits" < cfe-commits@lists.llvm.org> wrote: > Nico, this is producing tons of warnings on an LLVM build and is actually > breaking our internal builds (we build with -Werr

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Diego Novillo via cfe-commits
On Tue, Jan 19, 2016 at 3:30 PM, Nico Weber wrote: > I'll take a look. If it's urgent it's also possible to disable this > warning. > Yeah. I think disabling it by default may be the better choice. Thanks. ___ cfe-commits mailing list cfe-commits@lis

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Nico Weber via cfe-commits
I mean you could pass a -Wno flag. It's undefined behavior that's actually causing bugs in practice; it should probably be on by default. On Jan 19, 2016 3:38 PM, "Diego Novillo" wrote: > > > On Tue, Jan 19, 2016 at 3:30 PM, Nico Weber wrote: > >> I'll take a look. If it's urgent it's also possi

Re: r258128 - Add -Wexpansion-to-undefined: warn when using `defined` in a macro definition.

2016-01-19 Thread Diego Novillo via cfe-commits
On Tue, Jan 19, 2016 at 3:43 PM, Nico Weber wrote: > I mean you could pass a -Wno flag. It's undefined behavior that's actually > causing bugs in practice; it should probably be on by default. > But then you need to fix all the warnings it's producing in an llvm build. That is currently blocking

r258179 - [OpenMP] Detect implicit map type to report unspecified map type for target enter/exit data directives.

2016-01-19 Thread Samuel Antao via cfe-commits
Author: sfantao Date: Tue Jan 19 14:40:49 2016 New Revision: 258179 URL: http://llvm.org/viewvc/llvm-project?rev=258179&view=rev Log: [OpenMP] Detect implicit map type to report unspecified map type for target enter/exit data directives. Support for the following OpenMP 4.5 restriction on 'targe

  1   2   >