[clang-tools-extra] r359329 - Fix typo in documentation.

2019-04-26 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Fri Apr 26 10:56:22 2019 New Revision: 359329 URL: http://llvm.org/viewvc/llvm-project?rev=359329&view=rev Log: Fix typo in documentation. Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/abseil-time-comparison.rst Modified: clang-tools-extra/trunk/docs/clang-

r321665 - Suppress undefined-template warnings when the pattern is declared in a system header.

2018-01-02 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Tue Jan 2 11:10:12 2018 New Revision: 321665 URL: http://llvm.org/viewvc/llvm-project?rev=321665&view=rev Log: Suppress undefined-template warnings when the pattern is declared in a system header. The way to fix an undefined-template warning is to add lines to the header

r305239 - Revert r301742 which made ExprConstant checking apply to all full-exprs.

2017-06-12 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Jun 12 16:59:18 2017 New Revision: 305239 URL: http://llvm.org/viewvc/llvm-project?rev=305239&view=rev Log: Revert r301742 which made ExprConstant checking apply to all full-exprs. This patch also exposed pre-existing bugs in clang, see PR32864 and PR33140#c3 . Modifie

r305233 - Revert r303316, a change to ExprConstant to evaluate function arguments.

2017-06-12 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Jun 12 16:15:44 2017 New Revision: 305233 URL: http://llvm.org/viewvc/llvm-project?rev=305233&view=rev Log: Revert r303316, a change to ExprConstant to evaluate function arguments. The patch was itself correct but it uncovered other bugs which are going to be difficult

Re: r303317 - The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop.

2017-05-30 Thread Nick Lewycky via cfe-commits
Joerg Sonnenberger wrote: On Wed, May 17, 2017 at 11:56:55PM -, Nick Lewycky via cfe-commits wrote: Author: nicholas Date: Wed May 17 18:56:54 2017 New Revision: 303317 URL: http://llvm.org/viewvc/llvm-project?rev=303317&view=rev Log: The constant expression evaluator should exa

r303317 - The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop.

2017-05-17 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Wed May 17 18:56:54 2017 New Revision: 303317 URL: http://llvm.org/viewvc/llvm-project?rev=303317&view=rev Log: The constant expression evaluator should examine function arguments for non-constexpr function calls unless the EvalInfo says to stop. Modified: cfe/trunk/li

r301891 - Revert r301785 (and r301787) because they caused PR32864.

2017-05-01 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon May 1 20:06:16 2017 New Revision: 301891 URL: http://llvm.org/viewvc/llvm-project?rev=301891&view=rev Log: Revert r301785 (and r301787) because they caused PR32864. The fix is that ExprEvaluatorBase::VisitInitListExpr should handle transparent exprs instead of exprs w

r301787 - Fix test that was incorrected merged between patches.

2017-04-30 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun Apr 30 21:20:06 2017 New Revision: 301787 URL: http://llvm.org/viewvc/llvm-project?rev=301787&view=rev Log: Fix test that was incorrected merged between patches. Modified: cfe/trunk/test/Sema/integer-overflow.c Modified: cfe/trunk/test/Sema/integer-overflow.c URL:

r301785 - Handle expressions with non-literal types like ignored expressions if we are supposed to continue evaluating them.

2017-04-30 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun Apr 30 21:03:23 2017 New Revision: 301785 URL: http://llvm.org/viewvc/llvm-project?rev=301785&view=rev Log: Handle expressions with non-literal types like ignored expressions if we are supposed to continue evaluating them. Also fix a crash casting a derived nullptr to

r301742 - Remove Sema::CheckForIntOverflow, and instead check all full-expressions.

2017-04-29 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sat Apr 29 04:33:46 2017 New Revision: 301742 URL: http://llvm.org/viewvc/llvm-project?rev=301742&view=rev Log: Remove Sema::CheckForIntOverflow, and instead check all full-expressions. CheckForIntOverflow used to implement a whitelist of top-level expressions to send to th

r301721 - ObjCBoxedExpr can't be evaluated by the constant expression evaluator.

2017-04-28 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Fri Apr 28 19:07:27 2017 New Revision: 301721 URL: http://llvm.org/viewvc/llvm-project?rev=301721&view=rev Log: ObjCBoxedExpr can't be evaluated by the constant expression evaluator. A boxed expression evaluates its subexpr and then calls an objc method to transform it int

r301522 - In the expression evaluator, visit the index of an ArraySubscriptExpr even if we can't evaluate the base, if the evaluation mode tells us to continue evaluation.

2017-04-27 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Thu Apr 27 02:27:36 2017 New Revision: 301522 URL: http://llvm.org/viewvc/llvm-project?rev=301522&view=rev Log: In the expression evaluator, visit the index of an ArraySubscriptExpr even if we can't evaluate the base, if the evaluation mode tells us to continue evaluation.

r301520 - In the expression evaluator, descend into both the true and false expressions of a ConditionalOperator when the condition can't be evaluated and we're in an evaluation mode that says we shou

2017-04-27 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Thu Apr 27 02:11:09 2017 New Revision: 301520 URL: http://llvm.org/viewvc/llvm-project?rev=301520&view=rev Log: In the expression evaluator, descend into both the true and false expressions of a ConditionalOperator when the condition can't be evaluated and we're in an eval

r301138 - Fix typo in comment.

2017-04-23 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun Apr 23 15:46:58 2017 New Revision: 301138 URL: http://llvm.org/viewvc/llvm-project?rev=301138&view=rev Log: Fix typo in comment. Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h URL: http://llv

r295006 - When the new expr's array size is an ICE, emit it as a constant expression.

2017-02-13 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Feb 13 17:49:55 2017 New Revision: 295006 URL: http://llvm.org/viewvc/llvm-project?rev=295006&view=rev Log: When the new expr's array size is an ICE, emit it as a constant expression. This bypasses integer sanitization checks which are redundant on the expression since

r283795 - Make the LValue created in EmitValueForIvarAtOffset have the same Qualifiers in the LValue as the QualType in the LValue. No functionality change intended.

2016-10-10 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Oct 10 15:07:13 2016 New Revision: 283795 URL: http://llvm.org/viewvc/llvm-project?rev=283795&view=rev Log: Make the LValue created in EmitValueForIvarAtOffset have the same Qualifiers in the LValue as the QualType in the LValue. No functionality change intended. Modif

patch: clean up in EmitValueForIvarAtOffset

2016-10-09 Thread Nick Lewycky via cfe-commits
The attached patch makes the LValue created in EmitValueForIvarAtOffset have the same Qualifiers in the LValue as the QualType in the LValue. Noticed when auditing for reasons the QualType would different from the Qualifiers in an LValue. No functionality change. Please review! Nick lvalue-qual

r281996 - Fix typo in documentation.

2016-09-20 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Tue Sep 20 13:37:25 2016 New Revision: 281996 URL: http://llvm.org/viewvc/llvm-project?rev=281996&view=rev Log: Fix typo in documentation. Since this is a header it will break links to this section. Modified: cfe/trunk/docs/UndefinedBehaviorSanitizer.rst Modified: cfe

r281979 - Replace 'isProvablyNonNull' with existing utility llvm::IsKnownNonNull which handles more cases. Noticed by inspection.

2016-09-20 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Tue Sep 20 10:49:58 2016 New Revision: 281979 URL: http://llvm.org/viewvc/llvm-project?rev=281979&view=rev Log: Replace 'isProvablyNonNull' with existing utility llvm::IsKnownNonNull which handles more cases. Noticed by inspection. Because of how the IR generation works, t

Re: [PATCH] D24712: Replace 'isProvablyNonNull' with existing utility llvm::IsKnownNonNull.

2016-09-19 Thread Nick Lewycky via cfe-commits
On 19 September 2016 at 15:58, John McCall wrote: > rjmccall added a comment. > > Actually, that should demonstrate the difference, assuming the LLVM > function looks through selects, since IRGen should generate that as a > select. > It doesn't look past the Value* you hand it. As well as isa, i

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-09-12 Thread Nick Lewycky via cfe-commits
On 11 September 2016 at 21:14, Sam Shepperd via cfe-commits < cfe-commits@lists.llvm.org> wrote: > phabricss added a subscriber: phabricss. > phabricss added a comment. > > It is still impossible to compile glibc with clang due to this bug. Could > this patch be reviewed please. > Firstly, I tho

r280306 - Add -fprofile-dir= to clang.

2016-08-31 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Wed Aug 31 18:04:32 2016 New Revision: 280306 URL: http://llvm.org/viewvc/llvm-project?rev=280306&view=rev Log: Add -fprofile-dir= to clang. -fprofile-dir=path allows the user to specify where .gcda files should be emitted when the program is run. In particular, this is the

Re: [PATCH] D23734: Add -fprofile-dir= to clang.

2016-08-31 Thread Nick Lewycky via cfe-commits
nlewycky updated this revision to Diff 69905. https://reviews.llvm.org/D23734 Files: lib/Transforms/Instrumentation/GCOVProfiling.cpp test/Transforms/GCOVProfiling/three-element-mdnode.ll tools/clang/include/clang/Driver/CC1Options.td tools/clang/include/clang/Driver/Options.td tools/cl

Re: [PATCH] D23734: Add -fprofile-dir= to clang.

2016-08-30 Thread Nick Lewycky via cfe-commits
nlewycky added inline comments. Comment at: lib/Transforms/Instrumentation/GCOVProfiling.cpp:447 @@ -432,3 +446,3 @@ return Filename.str(); } } compnerd wrote: > It really feels like these two cases can be collapsed. I don't see a great way to

Re: [PATCH] D23734: Add -fprofile-dir= to clang.

2016-08-30 Thread Nick Lewycky via cfe-commits
nlewycky updated this revision to Diff 69778. nlewycky marked 5 inline comments as done. https://reviews.llvm.org/D23734 Files: lib/Transforms/Instrumentation/GCOVProfiling.cpp test/Transforms/GCOVProfiling/three-element-mdnode.ll tools/clang/include/clang/Driver/CC1Options.td tools/clang

Re: [PATCH] D23734: Add -fprofile-dir= to clang.

2016-08-29 Thread Nick Lewycky via cfe-commits
nlewycky added a comment. Ping! I think the review this patch really needs is a comparison to GCC's implementation to double-check that it really does the same thing that GCC does. Is there a gcov user who could take a look at this? https://reviews.llvm.org/D23734 _

Re: [PATCH] D23734: Add -fprofile-dir= to clang.

2016-08-19 Thread Nick Lewycky via cfe-commits
nlewycky updated this revision to Diff 68755. nlewycky added a comment. Forgot clang changes! https://reviews.llvm.org/D23734 Files: lib/Transforms/Instrumentation/GCOVProfiling.cpp test/Transforms/GCOVProfiling/three-element-mdnode.ll tools/clang/include/clang/Driver/CC1Options.td tool

[PATCH] D23734: Add -fprofile-dir= to clang.

2016-08-19 Thread Nick Lewycky via cfe-commits
nlewycky created this revision. nlewycky added subscribers: llvm-commits, cfe-commits. -fprofile-dir=path allows the user to specify where .gcda files should be emitted when the program is run. In particular, this is the first flag that causes the .gcno and .o files to have different paths, LLVM

Re: [PATCH] D22900: Revert r244207 - Mark calls in thunk functions as tail-call optimization

2016-08-09 Thread Nick Lewycky via cfe-commits
nlewycky added a comment. For the IR level, I think this has got to be valid: declare void @bar(i32* byval %p) define void @foo(i32* byval %p) { tail call void @bar(i32* byval %p.tmp) ret void } The `tail` is an aliasing property which indicates that the callee doesn't touch any o

Re: [PATCH] D21352: Add a "declared 'nonnull' here" note to warnings where an expression is checked against null.

2016-06-14 Thread Nick Lewycky via cfe-commits
nlewycky closed this revision. nlewycky added a comment. Closed by r272755. http://reviews.llvm.org/D21352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r272755 - Add a "declared 'nonnull' here" note to warnings where an expression is checked against null.

2016-06-14 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Wed Jun 15 00:18:39 2016 New Revision: 272755 URL: http://llvm.org/viewvc/llvm-project?rev=272755&view=rev Log: Add a "declared 'nonnull' here" note to warnings where an expression is checked against null. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D21352: Add a "declared 'nonnull' here" note to warnings where an expression is checked against null.

2016-06-14 Thread Nick Lewycky via cfe-commits
nlewycky created this revision. nlewycky added a subscriber: cfe-commits. Point to the relevant 'nonnull' or 'returns_nonnull' attribute when complaining about 'a == 0' or 'f() == 0' expressions. http://reviews.llvm.org/D21352 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaC

Re: r269572 - Warn when a reference is bound to an empty l-value (dereferenced null pointer).

2016-05-16 Thread Nick Lewycky via cfe-commits
Hans Wennborg wrote: On Sat, May 14, 2016 at 10:44 AM, Nick Lewycky via cfe-commits wrote: Author: nicholas Date: Sat May 14 12:44:14 2016 New Revision: 269572 URL: http://llvm.org/viewvc/llvm-project?rev=269572&view=rev Log: Warn when a reference is bound to an empty l-value (derefere

r269625 - Make this SourceLocation getter const LLVM_READONLY like others in the same file.

2016-05-15 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun May 15 21:46:07 2016 New Revision: 269625 URL: http://llvm.org/viewvc/llvm-project?rev=269625&view=rev Log: Make this SourceLocation getter const LLVM_READONLY like others in the same file. Modified: cfe/trunk/include/clang/AST/StmtObjC.h Modified: cfe/trunk/inclu

r269572 - Warn when a reference is bound to an empty l-value (dereferenced null pointer).

2016-05-14 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sat May 14 12:44:14 2016 New Revision: 269572 URL: http://llvm.org/viewvc/llvm-project?rev=269572&view=rev Log: Warn when a reference is bound to an empty l-value (dereferenced null pointer). Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/l

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-14 Thread Nick Lewycky via cfe-commits
nicholas closed this revision. nicholas added a comment. Closed by r269572. http://reviews.llvm.org/D19851 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-08 Thread Nick Lewycky via cfe-commits
nicholas updated this revision to Diff 56526. nicholas added a comment. Unsure why, but the previous diff didn't have the 'volatile' check removed. http://reviews.llvm.org/D19851 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaInit.cpp test/CXX/expr/expr.prim/expr.prim.lamb

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-04 Thread Nick Lewycky via cfe-commits
nicholas updated this revision to Diff 56236. nicholas added a comment. (Whoops, forgot to generate diff with full context for phab.) http://reviews.llvm.org/D19851 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaInit.cpp test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp te

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-04 Thread Nick Lewycky via cfe-commits
nicholas updated this revision to Diff 56235. nicholas marked an inline comment as done. http://reviews.llvm.org/D19851 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaInit.cpp test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp test/Parser/cxx-casting.cpp test/SemaCXX/cstyle

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-04 Thread Nick Lewycky via cfe-commits
nicholas marked 2 inline comments as done. Comment at: lib/Sema/SemaInit.cpp:3514-3518 @@ +3513,7 @@ +static void CheckForNullPointerDereference(Sema &S, const Expr *E) { + // Check to see if we are dereferencing a null pointer. If so, + // and if not volatile-qualified, this i

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-04 Thread Nick Lewycky via cfe-commits
nicholas updated this revision to Diff 56100. http://reviews.llvm.org/D19851 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaInit.cpp test/CXX/expr/expr.prim/expr.prim.lambda/p5.cpp test/Parser/cxx-casting.cpp test/SemaCXX/cstyle-cast.cpp test/SemaCXX/functional-cast.cp

Re: [PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-04 Thread Nick Lewycky via cfe-commits
nicholas marked 2 inline comments as done. nicholas added a comment. Richard Smith gave me some review feedback in person, the diagnostic should not be generated when setting up the Steps for the initializer sequence, but instead when InitializerSequence::Perform is called. This appears to work

[PATCH] D19851: Warn on binding reference to null in copy initialization

2016-05-02 Thread Nick Lewycky via cfe-commits
nicholas created this revision. nicholas added a reviewer: cfe-commits. The attached patch adds a warning when placing a call like: func(*static_cast(nullptr)); to the existing -Wnull-dereference warning. The existing warning catches the case where the empty lvalue undergoes lvalue-to-rvalue c

Re: [PATCH] D19586: Misleading Indentation check

2016-04-27 Thread Nick Lewycky via cfe-commits
nlewycky added a subscriber: nlewycky. Comment at: clang-tidy/readability/MisleadingIndentationCheck.cpp:31 @@ +30,3 @@ + Result.SourceManager->getExpansionColumnNumber(ElseLoc)) +diag(ElseLoc, "potentional dangling else"); +} Typo of "potential" as "pote

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-14 Thread Nick Lewycky via cfe-commits
On 14 January 2016 at 15:05, Zhao, Weiming wrote: > I agree what you said about different code generated with clang and GCC > generates. In this case, we should throw an error (err_late_asm_label). > > But in this example, there is no use of the function. They are just > redundant declarations an

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-14 Thread Nick Lewycky via cfe-commits
On 14 January 2016 at 10:38, Weiming Zhao via cfe-commits < cfe-commits@lists.llvm.org> wrote: > weimingz added a comment. > > Hi Nick, > > Below is a reduced code: > t.c: > > static long double acoshl (long double __x) __asm__ ("" "acosh") ; // > this is from /arm-linux-gnueabi/libc/usr/includ

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-14 Thread Nick Lewycky via cfe-commits
Weiming Zhao wrote: weimingz created this revision. weimingz added a reviewer: nicholas. weimingz added a subscriber: cfe-commits. r255371 errors on redeclaring with a conflicting asm label. This patch changes errors to warnings to prevent breaking existing codes. Can you include a testcase wh

Re: [PATCH] D16171: Warning on redeclaring with a conflicting asm label

2016-01-14 Thread Nick Lewycky via cfe-commits
nicholas added a subscriber: nicholas. nicholas added a comment. Weiming Zhao wrote: > weimingz created this revision. > weimingz added a reviewer: nicholas. > weimingz added a subscriber: cfe-commits. > > r255371 errors on redeclaring with a conflicting asm label. > This patch changes e

Re: r255371 - Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled

2016-01-04 Thread Nick Lewycky via cfe-commits
On 01/04/2016 01:40 PM, Kostya Serebryany wrote: On Thu, Dec 17, 2015 at 5:03 PM, Richard Smith mailto:rich...@metafoo.co.uk>> wrote: On Thu, Dec 17, 2015 at 3:59 PM, Nick Lewycky via cfe-commits mailto:cfe-commits@lists.llvm.org>> wrote: On 12/17/2015 10:4

Re: [PATCH] D15861: Support fully-qualified names for all QualTypes

2016-01-04 Thread Nick Lewycky via cfe-commits
nlewycky added a subscriber: nlewycky. nlewycky added a comment. (I'm not doing a full review, I just happened to notice a couple things when skimming.) Comment at: lib/Tooling/Core/QualTypeNames.cpp:250 @@ +249,3 @@ +// There are probably other cases ... +if (const Tag

Re: r255371 - Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled

2015-12-17 Thread Nick Lewycky via cfe-commits
this is a bug in glibc code, or the error message could be more relaxed? Could you email me a .i copy of a failing build? That will help me decide whether it's a bug in the error or in glibc. On Fri, Dec 11, 2015 at 1:28 PM, Nick Lewycky via cfe-commits mailto:cfe-commits@lists.llv

r255371 - Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gcc and clang both compiled the

2015-12-11 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Fri Dec 11 15:28:55 2015 New Revision: 255371 URL: http://llvm.org/viewvc/llvm-project?rev=255371&view=rev Log: Error on redeclaring with a conflicting asm label and on redeclaring with an asm label after the first ODR-use. Detects problems like the one in PR22830 where gc

Re: PATCH: error on code that redeclares with an __asm__ label after the first ODR use

2015-12-11 Thread Nick Lewycky via cfe-commits
>> >> >> >> void f(); >> >> void g() __asm__(“real_g”); // rename g into real_g. >> >> >> >> void f() { >> >> g(); // this would actually be calling real_g() >> >> } >> >> void real_g() __asm__("gold&q

Re: PATCH: error on code that redeclares with an __asm__ label after the first ODR use

2015-12-11 Thread Nick Lewycky via cfe-commits
;gold", but changing the asm label in a program is highly dubious. I added an error for this too. Thanks! > *From:* cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] *On > Behalf Of *Nick Lewycky via cfe-commits > *Sent:* Thursday, December 10, 2015 3:15 PM > *To:

PATCH: error on code that redeclares with an __asm__ label after the first ODR use

2015-12-10 Thread Nick Lewycky via cfe-commits
PR22830 shows a case where some code was adding an __asm__ label after the first use of a function. GCC and Clang diverged on this code, GCC emitting the name in the last __asm__ label for all uses while clang would switch in the middle of the TU as the redeclaration was parsed. The attached patch

r250666 - No functionality change, just fix whitespace, a typo and remove an unnecessary

2015-10-18 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Sun Oct 18 15:32:12 2015 New Revision: 250666 URL: http://llvm.org/viewvc/llvm-project?rev=250666&view=rev Log: No functionality change, just fix whitespace, a typo and remove an unnecessary emacs mode marker. (Changes left behind from another patch that ended up not working

Re: [PATCH] D13373: Emiting invariant.group.barrier for ctors bugfix

2015-10-01 Thread Nick Lewycky via cfe-commits
nlewycky added a comment. I can't meaningfully review this, but I see nothing wrong here. Comment at: lib/CodeGen/CGClass.cpp:1378 @@ -1377,3 +1377,3 @@ - bool BaseVPtrsInitialized = false; + llvm::Value* const OldThis = CXXThisValue; // Virtual base initializers first. -

Re: [PATCH] __attribute__((enable_if)) and non-overloaded member functions

2015-09-16 Thread Nick Lewycky via cfe-commits
+gbiv, would you be able to review this? On Sep 14, 2015 7:42 AM, "Ettore Speziale" wrote: > Ping > > > Gently ping. > > > >> On Aug 26, 2015, at 2:40 PM, Ettore Speziale > wrote: > >> > >> Forward to the right ML: > >> > Sorry about the extreme delay. This patch slipped through the cracks,

Re: [PATCH] D12719: ScalarEvolution assume hanging bugfix

2015-09-08 Thread Nick Lewycky via cfe-commits
On 8 September 2015 at 20:27, Sanjoy Das wrote: > sanjoy added a comment. > > I don't think this is an infinite loop (Piotr, can you please verify > this?), it is probably an O(n!) recursion where n == number of the > assumptions. > > ScalarEvolution::isImpliedCond already guards for infinite loo

Re: [PATCH] D12719: ScalarEvolution assume hanging bugfix

2015-09-08 Thread Nick Lewycky via cfe-commits
nlewycky added inline comments. Comment at: lib/Analysis/ScalarEvolution.cpp:6980 @@ -6991,1 +6979,3 @@ + // Check conditions due to any @llvm.assume intrinsics. + for (auto &AssumeVH : AC.assumptions()) { Prazek wrote: > nlewycky wrote: > > What is it about t

Re: [PATCH] D12719: ScalarEvolution assume hanging bugfix

2015-09-08 Thread Nick Lewycky via cfe-commits
nlewycky added inline comments. Comment at: lib/Analysis/ScalarEvolution.cpp:6980 @@ -6991,1 +6979,3 @@ + // Check conditions due to any @llvm.assume intrinsics. + for (auto &AssumeVH : AC.assumptions()) { What is it about this check which is a problem? Or put

Fwd: [PATCH] __attribute__((enable_if)) and non-overloaded member functions

2015-08-26 Thread Nick Lewycky via cfe-commits
--> lists.llvm.org -- Forwarded message -- From: Ettore Speziale Date: 26 August 2015 at 14:35 Subject: Re: [PATCH] __attribute__((enable_if)) and non-overloaded member functions To: Nick Lewycky Cc: llvm cfe Hello, > Sorry about the extreme delay. This patch slipped through

r245985 - Make sure that we evaluate __attribute__((enable_if)) on a method with no overloads. Patch by Ettore Speziale!

2015-08-25 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Tue Aug 25 17:33:16 2015 New Revision: 245985 URL: http://llvm.org/viewvc/llvm-project?rev=245985&view=rev Log: Make sure that we evaluate __attribute__((enable_if)) on a method with no overloads. Patch by Ettore Speziale! Modified: cfe/trunk/lib/Sema/SemaOverload.cpp

r245979 - Clarify the error message when the reason the conversion is not viable is because the returned value does not match the function return type.

2015-08-25 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Tue Aug 25 17:18:46 2015 New Revision: 245979 URL: http://llvm.org/viewvc/llvm-project?rev=245979&view=rev Log: Clarify the error message when the reason the conversion is not viable is because the returned value does not match the function return type. Modified: cfe/t

Re: patch: clarify diagnostic when returned value doesn't match function return type

2015-08-24 Thread Nick Lewycky via cfe-commits
On 19 August 2015 at 15:18, Nick Lewycky wrote: > On 10 August 2015 at 19:08, Nick Lewycky wrote: > >> This simple-minded patch extends the case where we report "no viable >> conversion from 'X' to 'Y'" to emit a more useful diagnostic "no viable >> conversion from returned value of type 'X' to

Re: patch: clarify diagnostic when returned value doesn't match function return type

2015-08-19 Thread Nick Lewycky via cfe-commits
On 10 August 2015 at 19:08, Nick Lewycky wrote: > This simple-minded patch extends the case where we report "no viable > conversion from 'X' to 'Y'" to emit a more useful diagnostic "no viable > conversion from returned value of type 'X' to function return type 'Y'" > when used in that context. >

patch: clarify diagnostic when returned value doesn't match function return type

2015-08-10 Thread Nick Lewycky via cfe-commits
This simple-minded patch extends the case where we report "no viable conversion from 'X' to 'Y'" to emit a more useful diagnostic "no viable conversion from returned value of type 'X' to function return type 'Y'" when used in that context. In lieu of adding tests for this diagnostic explicitly, I'

r244515 - If a variable template is inside a context with template arguments that is being instantiated, and that instantiation fails, fail our instantiation instead of crashing. Errors have already b

2015-08-10 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Aug 10 16:54:08 2015 New Revision: 244515 URL: http://llvm.org/viewvc/llvm-project?rev=244515&view=rev Log: If a variable template is inside a context with template arguments that is being instantiated, and that instantiation fails, fail our instantiation instead of cr

r244490 - Fix typo.

2015-08-10 Thread Nick Lewycky via cfe-commits
Author: nicholas Date: Mon Aug 10 14:54:11 2015 New Revision: 244490 URL: http://llvm.org/viewvc/llvm-project?rev=244490&view=rev Log: Fix typo. Modified: cfe/trunk/docs/LanguageExtensions.rst Modified: cfe/trunk/docs/LanguageExtensions.rst URL: http://llvm.org/viewvc/llvm-project/cfe/trunk