r245250 - Make a test less brittle.

2015-08-17 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Aug 17 17:18:30 2015 New Revision: 245250 URL: http://llvm.org/viewvc/llvm-project?rev=245250view=rev Log: Make a test less brittle. Capture line numbers in a variable for FileCheck instead of hardcoding them. Modified:

r245507 - Fix -Wlogical-not-parentheses to work better with C code.

2015-08-19 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Aug 19 16:33:54 2015 New Revision: 245507 URL: http://llvm.org/viewvc/llvm-project?rev=245507view=rev Log: Fix -Wlogical-not-parentheses to work better with C code. Remove the assumption of a Boolean type by checking if an expression is known to have a boolean value.

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-10 Thread Richard Trieu via cfe-commits
rtrieu added a comment. There are still a lot of other cases in which my method still works as the old version did. And I think there are several bugs in the existing functions like emitDiagnostic and mapDiagnosticRanges. This is issued as a bug, the link is

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-12 Thread Richard Trieu via cfe-commits
rtrieu accepted this revision. rtrieu added a comment. This revision is now accepted and ready to land. This is a first step towards making macro diagnostics better. http://reviews.llvm.org/D11778 ___ cfe-commits mailing list

Re: [PATCH] D11778: Improvements on Diagnostic in Macro Expansions

2015-08-12 Thread Richard Trieu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL244788: Stop printing macro backtraces that don't help diagnostics. (authored by rtrieu). Changed prior to commit: http://reviews.llvm.org/D11778?vs=31425id=31965#toc Repository: rL LLVM

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-15 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: include/clang/Basic/SourceManager.h:333 @@ -332,2 +332,3 @@ + bool isMacroBodyExpansion() const { Remove unrelated whitespace change. Comment at: include/clang/Basic/SourceManager.h:1155-1164 @@

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-14 Thread Richard Trieu via cfe-commits
rtrieu added a comment. Why are you leaking the raw encoding of locations from the SourceManager? This is an internal implementation detail and should not be relied on externally. SourceLocation is the typical way to use locations. http://reviews.llvm.org/D12379

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-14 Thread Richard Trieu via cfe-commits
rtrieu added a comment. In http://reviews.llvm.org/D12379#245850, @zhengkai wrote: > In http://reviews.llvm.org/D12379#245849, @rtrieu wrote: > > > Why are you leaking the raw encoding of locations from the SourceManager? > > This is an internal implementation detail and should not be relied

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-14 Thread Richard Trieu via cfe-commits
rtrieu added a comment. In http://reviews.llvm.org/D12379#245868, @zhengkai wrote: > In http://reviews.llvm.org/D12379#245861, @rtrieu wrote: > > > In http://reviews.llvm.org/D12379#245850, @zhengkai wrote: > > > > > In http://reviews.llvm.org/D12379#245849, @rtrieu wrote: > > > > > > > Why are

Re: [PATCH] D13157: Teach -Wtautological-overlap-compare about enums

2015-09-30 Thread Richard Trieu via cfe-commits
rtrieu accepted this revision. rtrieu added a comment. Fix the comments, then it should be ready to commit. Comment at: lib/Analysis/CFG.cpp:49 @@ +48,3 @@ +tryNormalizeBinaryOperator(const BinaryOperator *B) { + auto TryTransformToIntOrEnumConstant = [](const Expr *E) ->

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-22 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: lib/Basic/SourceManager.cpp:1008 @@ -1008,1 +1007,3 @@ +bool SourceManager::isMacroArgExpansion(SourceLocation Loc, + SourceLocation *NewLoc) const { if (!Loc.isMacroID()) return false;

r248064 - Split off the binary literal warning into a subgroup of C++14 warnings

2015-09-18 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Sep 18 18:18:39 2015 New Revision: 248064 URL: http://llvm.org/viewvc/llvm-project?rev=248064=rev Log: Split off the binary literal warning into a subgroup of C++14 warnings Binary literals predate C++14, but they are listed as a C++14 extension since this was the first

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-23 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: lib/Frontend/DiagnosticRenderer.cpp:442 @@ -419,1 +441,3 @@ +static bool checkLocForMacroArgExpansion(SourceLocation Loc, + const SourceManager , zhengkai wrote: > I have stated

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-23 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: lib/Frontend/DiagnosticRenderer.cpp:455 @@ -419,1 +454,3 @@ +static bool checkLocForMacroArgExpansion(SourceLocation Loc, + const SourceManager , rtrieu wrote: > zhengkai wrote: >

r248454 - Improve the printing of ranges when macros are involved.

2015-09-23 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Sep 23 20:21:01 2015 New Revision: 248454 URL: http://llvm.org/viewvc/llvm-project?rev=248454=rev Log: Improve the printing of ranges when macros are involved. Trace the ranges through the macro backtrace better. This allows better range highlighting through all levels

Re: [PATCH] D12379: Fix the bugs in the mapDiagnosticRanges (Still in progress)

2015-09-23 Thread Richard Trieu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL248454: Improve the printing of ranges when macros are involved. (authored by rtrieu). Changed prior to commit: http://reviews.llvm.org/D12379?vs=35575=35580#toc Repository: rL LLVM

[PATCH] D15255: Remove false positive from -Wpessimizing-move and GNU statement expressions

2015-12-04 Thread Richard Trieu via cfe-commits
rtrieu created this revision. rtrieu added a subscriber: cfe-commits. Track whether the initialization came from a GNU statement expression. If it does, prevent the -Wpessiming-move warning from being emitted since the suggested fix can cause a compile error. Fix for

r255875 - Add QualType case to operator< for DynTypedNode.

2015-12-16 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Dec 16 22:46:48 2015 New Revision: 255875 URL: http://llvm.org/viewvc/llvm-project?rev=255875=rev Log: Add QualType case to operator< for DynTypedNode. This allows sorting DynTypedNode's which are QualType's since QualType does not have memoization. Modified:

Re: r255875 - Add QualType case to operator< for DynTypedNode.

2015-12-17 Thread Richard Trieu via cfe-commits
On Thu, Dec 17, 2015 at 5:47 AM, Aaron Ballman <aa...@aaronballman.com> wrote: > On Wed, Dec 16, 2015 at 11:46 PM, Richard Trieu via cfe-commits > <cfe-commits@lists.llvm.org> wrote: > > Author: rtrieu > > Date: Wed Dec 16 22:46:48 2015 > > New Revision: 255875

r255929 - Fix r255875, use '<' instead of '==' for 'operator<'

2015-12-17 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Dec 17 15:56:22 2015 New Revision: 255929 URL: http://llvm.org/viewvc/llvm-project?rev=255929=rev Log: Fix r255875, use '<' instead of '==' for 'operator<' Aaron Ballman pointed out a typo from the copy and paste in r255875. This will preserve the strict weak ordering

r255937 - Add a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType.

2015-12-17 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Dec 17 17:20:57 2015 New Revision: 255937 URL: http://llvm.org/viewvc/llvm-project?rev=255937=rev Log: Add a test for r255875 & r255929, comparisons on DynTypeNode wrapped QualType. Modified: cfe/trunk/unittests/AST/ASTTypeTraitsTest.cpp Modified:

Re: r255875 - Add QualType case to operator< for DynTypedNode.

2015-12-17 Thread Richard Trieu via cfe-commits
llman <aa...@aaronballman.com> > > wrote: > >> > >> On Wed, Dec 16, 2015 at 11:46 PM, Richard Trieu via cfe-commits > >> <cfe-commits@lists.llvm.org> wrote: > >> > Author: rtrieu > >> > Date: Wed Dec 16 22:46:48 2015 > >&

r256976 - Improve conditional checking during template instantiation.

2016-01-06 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Jan 6 15:11:18 2016 New Revision: 256976 URL: http://llvm.org/viewvc/llvm-project?rev=256976=rev Log: Improve conditional checking during template instantiation. When the condition in an if statement, while statement, or for loop is created during template

r257240 - Only take NULL macros instead of all macros into account for -Wnull-conversion.

2016-01-08 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jan 8 19:10:17 2016 New Revision: 257240 URL: http://llvm.org/viewvc/llvm-project?rev=257240=rev Log: Only take NULL macros instead of all macros into account for -Wnull-conversion. Modified: cfe/trunk/lib/Sema/SemaChecking.cpp

r257231 - Exclude function calls for functions which have return type nullptr_t from

2016-01-08 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jan 8 17:35:06 2016 New Revision: 257231 URL: http://llvm.org/viewvc/llvm-project?rev=257231=rev Log: Exclude function calls for functions which have return type nullptr_t from -Wnull-conversion warning. These functions are basically equivalent to other pointer

r272318 - Fix a crash in the AST dumper.

2016-06-09 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jun 9 17:03:04 2016 New Revision: 272318 URL: http://llvm.org/viewvc/llvm-project?rev=272318=rev Log: Fix a crash in the AST dumper. Boxed expressions in a template context may have a null method decl. If so, don't try to access the selector. Modified:

r272325 - Redirect unused output in test to /dev/null

2016-06-09 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jun 9 17:39:20 2016 New Revision: 272325 URL: http://llvm.org/viewvc/llvm-project?rev=272325=rev Log: Redirect unused output in test to /dev/null Discard unused output so when the test fails, it only prints information that is helpful about the failure. No functional

r272368 - Check for null pointers before calling the Stmt Profiler

2016-06-09 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jun 9 23:52:09 2016 New Revision: 272368 URL: http://llvm.org/viewvc/llvm-project?rev=272368=rev Log: Check for null pointers before calling the Stmt Profiler Some calls from OMPClauseProfiler were calling the Stmt Profiler with null pointers, but the profiler can only

[PATCH] D21675: New ODR checker for modules

2016-06-23 Thread Richard Trieu via cfe-commits
rtrieu created this revision. rtrieu added a subscriber: cfe-commits. Early prototype of an improved ODR checker for Clang and modules. The current ODR checking of classes is limited to a small number of attributes such as number of methods and base classes. This still allows a number of ODR

Re: [PATCH] D15384: Don't ask for the size of dependent integral types in template diffing

2016-01-15 Thread Richard Trieu via cfe-commits
rtrieu added a comment. I've fixed this issue as part of the template type diffing refactoring. r257870 was the last of the refactoring, and includes your test case in it. http://reviews.llvm.org/D15384 ___ cfe-commits mailing list

r257861 - Save the integer type for integral template arguments.

2016-01-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 14 20:55:17 2016 New Revision: 257861 URL: http://llvm.org/viewvc/llvm-project?rev=257861=rev Log: Save the integer type for integral template arguments. Save the integer type when diffing integers in template type diffing. When integers are different sizes, print

r257838 - Change the TSTiterator in Template Type Diffing.

2016-01-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 14 17:30:12 2016 New Revision: 257838 URL: http://llvm.org/viewvc/llvm-project?rev=257838=rev Log: Change the TSTiterator in Template Type Diffing. Modify the TSTiterator to have two internal iterators, which will walk the provided sugared type and the desugared

r257853 - Make template type diffing use the new desguared iterator.

2016-01-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 14 19:08:56 2016 New Revision: 257853 URL: http://llvm.org/viewvc/llvm-project?rev=257853=rev Log: Make template type diffing use the new desguared iterator. If available, use the canonical template argument to fill in information for template type diffing instead of

r257869 - Add new diff modes to template type diffing.

2016-01-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 14 23:01:53 2016 New Revision: 257869 URL: http://llvm.org/viewvc/llvm-project?rev=257869=rev Log: Add new diff modes to template type diffing. Remove an old assertion that does not hold. It is possible for a template argument to be a declaration in one

r257870 - Fixing more issues with template type diffing

2016-01-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 14 23:48:38 2016 New Revision: 257870 URL: http://llvm.org/viewvc/llvm-project?rev=257870=rev Log: Fixing more issues with template type diffing 1) Print qualifiers for templates with zero arguments 2) Add a few more tests for the template type diffing refactoring.

r257831 - Refactor template type diffing

2016-01-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Jan 14 16:56:39 2016 New Revision: 257831 URL: http://llvm.org/viewvc/llvm-project?rev=257831=rev Log: Refactor template type diffing 1) Instead of using pairs of From/To* fields, combine fields into a struct TemplateArgInfo and have two in each DiffNode. 2) Use default

Re: [PATCH] D3976: -Wcomma, a new warning for questionable uses of the comma operator

2016-02-05 Thread Richard Trieu via cfe-commits
So, this week got consumed by -Wconstant-conversion. We'll see how next week goes. On Fri, Jan 29, 2016 at 7:16 PM, Richard Trieu wrote: > rtrieu added a comment. > > Not sure what happened. Will check it out on Monday. > > > http://reviews.llvm.org/D3976 > > > >

Re: r259271 - Improve -Wconstant-conversion

2016-02-05 Thread Richard Trieu via cfe-commits
initialized with numbers 0...255 >> instead of -128...127 (why not make the array uint8_t then? Because maybe >> the function you want to pass the data from wants a char* array, and having >> to reinterpret_cast from uint8_t to char is annoying). Maybe this shouldn't >> fir

r259947 - Exempt char array initializers from -Wconstant-converion.

2016-02-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 5 17:02:38 2016 New Revision: 259947 URL: http://llvm.org/viewvc/llvm-project?rev=259947=rev Log: Exempt char array initializers from -Wconstant-converion. Sometimes, char arrays are used as bit storage, with no difference made between signed and unsigned char.

Re: [PATCH] D15636: Reduce false positives in printf/scanf format checker

2016-02-04 Thread Richard Trieu via cfe-commits
rtrieu added a comment. In http://reviews.llvm.org/D15636#343856, @AndyG wrote: > In your case, the first string would be highlighted only. Yes, I see what > you mean. Is it possible to have multiple ranges for the diagnostic? By > which I mean, to produce the following: > > test.cpp:x:y:

Re: [PATCH] D15636: Reduce false positives in printf/scanf format checker

2016-01-26 Thread Richard Trieu via cfe-commits
rtrieu added a comment. It looks like you are limiting to one diagnostic per printf, no matter the number of format strings. How is the case when multiple format strings would trigger the warning? http://reviews.llvm.org/D15636 ___ cfe-commits

Re: r259271 - Improve -Wconstant-conversion

2016-02-01 Thread Richard Trieu via cfe-commits
> to reinterpret_cast from uint8_t to char is annoying). Maybe this shouldn't > fire for char arrays? > > On Fri, Jan 29, 2016 at 6:51 PM, Richard Trieu via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rtrieu >> Date: Fri Jan 29 17:51:16 2016

r259445 - Template Type Diffing change

2016-02-01 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Feb 1 18:36:59 2016 New Revision: 259445 URL: http://llvm.org/viewvc/llvm-project?rev=259445=rev Log: Template Type Diffing change When all the arguments of a template are elided, print "A<...>" instead of "A<[2 * ...]>". Also remove comment fragment that means

r259271 - Improve -Wconstant-conversion

2016-01-29 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Jan 29 17:51:16 2016 New Revision: 259271 URL: http://llvm.org/viewvc/llvm-project?rev=259271=rev Log: Improve -Wconstant-conversion Switch the evaluation from isIntegerConstantExpr to EvaluateAsInt. EvaluateAsInt will evaluate more types of expressions than

Re: [PATCH] D15636: Reduce false positives in printf/scanf format checker

2016-02-03 Thread Richard Trieu via cfe-commits
rtrieu added a comment. Oops, forget to hit send on my last comment. My concern is something like: printf(condition ? "first message: %d" : "second message: %d", 5, 10); There's nothing in the code implying that either message is the one that should be using two arguments, so which one will

Re: [PATCH] D3976: -Wcomma, a new warning for questionable uses of the comma operator

2016-01-29 Thread Richard Trieu via cfe-commits
rtrieu added a comment. Not sure what happened. Will check it out on Monday. http://reviews.llvm.org/D3976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D15636: Reduce false positives in printf/scanf format checker

2016-02-23 Thread Richard Trieu via cfe-commits
rtrieu added a comment. A few more comments. In http://reviews.llvm.org/D15636#358588, @AndyG wrote: > Patch additionally re-based off r261522. It's usually a bad idea to rebase in the middle of a string of patches. Phabricator isn't aware of revisions, so while a base to latest patch will

Re: [PATCH] D17239: Sema: typo correct both sides of binary expression

2016-02-23 Thread Richard Trieu via cfe-commits
rtrieu added a comment. While this change does add the intended error messages, it won't produce a correct a typo-corrected AST. For instance: void run(int sss) { sss = ? : ; } Will produce an empty function body: `-FunctionDecl 0x7082ef0

Re: [PATCH] D15636: Reduce false positives in printf/scanf format checker

2016-02-25 Thread Richard Trieu via cfe-commits
rtrieu accepted this revision. rtrieu added a comment. This revision is now accepted and ready to land. LGTM The other issues brought up in this review can go in follow up patches. http://reviews.llvm.org/D15636 ___ cfe-commits mailing list

Re: [PATCH] D17627: Fix false positives for for-loop-analysis warning

2016-02-25 Thread Richard Trieu via cfe-commits
rtrieu added a comment. This seems rather strange. Usually, a OpaqueValueExpr will hold an expression that is held elsewhere in the AST. However, in this case, it appears that all the references to --i are all behind OpaqueValueExpr's, so they aren't processed. `-CStyleCastExpr 0x5675d30

Re: [PATCH] D15636: Reduce false positives in printf/scanf format checker

2016-01-25 Thread Richard Trieu via cfe-commits
rtrieu added a comment. Hi Andy, Could you give some motivation for this patch? From your example: printf(minimal ? "%i\n" : "%i: %s\n", code, msg); I would expect the first format string to produce a warning that msg is not used. http://reviews.llvm.org/D15636

r258778 - Fix -Wnull-conversion for long macros.

2016-01-25 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Jan 25 20:51:55 2016 New Revision: 258778 URL: http://llvm.org/viewvc/llvm-project?rev=258778=rev Log: Fix -Wnull-conversion for long macros. Move the function to get a macro name from DiagnosticRenderer.cpp to Lexer.cpp so that other files can use it. Lexer now has two

r261271 - Remove use of builtin comma operator.

2016-02-18 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Feb 18 16:34:54 2016 New Revision: 261271 URL: http://llvm.org/viewvc/llvm-project?rev=261271=rev Log: Remove use of builtin comma operator. Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. Modified:

r261278 - Add -Wcomma warning to Clang.

2016-02-18 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Feb 18 17:58:40 2016 New Revision: 261278 URL: http://llvm.org/viewvc/llvm-project?rev=261278=rev Log: Add -Wcomma warning to Clang. -Wcomma will detect and warn on most uses of the builtin comma operator. It currently whitelists the first and third statements of the

r263091 - Disable failing test and fix RUN line.

2016-03-09 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Mar 9 22:04:12 2016 New Revision: 263091 URL: http://llvm.org/viewvc/llvm-project?rev=263091=rev Log: Disable failing test and fix RUN line. See https://llvm.org/bugs/show_bug.cgi?id=26894 for details. This change fixes the incorrect flags to Clang and the piping

r264940 - Fix Clang crash with template type diffing.

2016-03-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Mar 30 17:23:00 2016 New Revision: 264940 URL: http://llvm.org/viewvc/llvm-project?rev=264940=rev Log: Fix Clang crash with template type diffing. Fixes https://llvm.org/bugs/show_bug.cgi?id=27129 which is crash involving type aliases and template type diffing. Template

r264991 - Fix -Wdynamic-class-memaccess to skip invalid classes.

2016-03-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Mar 30 23:18:07 2016 New Revision: 264991 URL: http://llvm.org/viewvc/llvm-project?rev=264991=rev Log: Fix -Wdynamic-class-memaccess to skip invalid classes. This warning sometimes will infinitely recurse on CXXRecordDecl's from ill-formed recursive classes that have

r265467 - Fix a crash on invalid with template handling

2016-04-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Apr 5 16:13:54 2016 New Revision: 265467 URL: http://llvm.org/viewvc/llvm-project?rev=265467=rev Log: Fix a crash on invalid with template handling This is a fix for https://llvm.org/bugs/show_bug.cgi?id=25561 which was a crash on invalid. Change the handling of

r265991 - Adjust tests to have consistent integer sizes.

2016-04-11 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Apr 11 15:37:04 2016 New Revision: 265991 URL: http://llvm.org/viewvc/llvm-project?rev=265991=rev Log: Adjust tests to have consistent integer sizes. Add a triple to the run lines so that integers will the same sizes across runs. Also add a compile time check to ensure

r262765 - Add null check to diagnostic path for lambda captures.

2016-03-04 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Mar 4 22:04:57 2016 New Revision: 262765 URL: http://llvm.org/viewvc/llvm-project?rev=262765=rev Log: Add null check to diagnostic path for lambda captures. Previously, the failed capture of a variable in nested lambdas may crash when the lambda pointer is null. Only

Re: r267054 - Split interesting warnings off from -Wfloat-conversion

2016-04-22 Thread Richard Trieu via cfe-commits
for > [...] zero/non-zero should all be done without equality comparisons."). So > making this a warning for floats but not for others seems weird to me. > > Nico > > > On Thu, Apr 21, 2016 at 5:04 PM, Richard Trieu via cfe-commits < > cfe-commits@lists.llvm.org&

Re: r267054 - Split interesting warnings off from -Wfloat-conversion

2016-04-22 Thread Richard Trieu via cfe-commits
On Fri, Apr 22, 2016 at 10:50 AM, David Blaikie <dblai...@gmail.com> wrote: > > > On Thu, Apr 21, 2016 at 2:04 PM, Richard Trieu via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rtrieu >> Date: Thu Apr 21 16:04:55 2016 >> New Revis

r267054 - Split interesting warnings off from -Wfloat-conversion

2016-04-21 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Apr 21 16:04:55 2016 New Revision: 267054 URL: http://llvm.org/viewvc/llvm-project?rev=267054=rev Log: Split interesting warnings off from -Wfloat-conversion Restructure the implict floating point to integer conversions so that interesting sub-groups are under different

Re: [PATCH] D19312: Warn about UB at member function calls from base class ctor initializers.

2016-04-21 Thread Richard Trieu via cfe-commits
rtrieu added a subscriber: rtrieu. rtrieu added a comment. Have you looked at http://reviews.llvm.org/D6561 which was a previous attempt at this warning? http://reviews.llvm.org/D19312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D19084: [scan-build] fix warnings emitted on Clang AST code base

2016-05-12 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: lib/AST/ASTDiagnostic.cpp:1686 @@ -1685,3 +1685,3 @@ -if (Same) { +if (Same && FromTD) { OS << "template " << FromTD->getNameAsString(); apelete wrote: > rtrieu wrote: > > dblaikie wrote: > > > Should

Re: [PATCH] D19829: [scan-build] fix dead store warnings emitted on clang code base

2016-05-05 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9629 @@ -9628,3 +9628,3 @@ // Track if the current expression is the result of a derefence, and if the // next checked expression is the result of a derefence. bool IsDereference = false;

Re: [PATCH] D19084: [scan-build] fix warnings emitted on Clang AST code base

2016-05-05 Thread Richard Trieu via cfe-commits
rtrieu added inline comments. Comment at: lib/AST/ASTDiagnostic.cpp:1686 @@ -1685,3 +1685,3 @@ -if (Same) { +if (Same && FromTD) { OS << "template " << FromTD->getNameAsString(); dblaikie wrote: > Should this be a condition, or just an assertion?

r277796 - Allow -1 to assign max value to unsigned bitfields.

2016-08-04 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Aug 4 21:39:30 2016 New Revision: 277796 URL: http://llvm.org/viewvc/llvm-project?rev=277796=rev Log: Allow -1 to assign max value to unsigned bitfields. Silence the -Wbitfield-constant-conversion warning for when -1 or other negative values are assigned to unsigned

r277797 - Fix crash in template type diffing.

2016-08-04 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Aug 4 22:16:36 2016 New Revision: 277797 URL: http://llvm.org/viewvc/llvm-project?rev=277797=rev Log: Fix crash in template type diffing. When the type being diffed is a type alias, and the orginal type is not a templated type, then there will be no unsugared

Diagnostics improvements for 3.9

2016-08-05 Thread Richard Trieu via cfe-commits
Hans, Richard, These are some last minute diagnostic improvements for 3.9. http://llvm.org/viewvc/llvm-project?rev=277796=rev r277796 Don't warn when negative values, like -1, are used to initialize unsigned bit fields. http://llvm.org/viewvc/llvm-project?rev=277797=rev r277797 Fix crash with

r277900 - Fix typos from r277797 and unused variable from r277889.

2016-08-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Aug 5 20:44:06 2016 New Revision: 277900 URL: http://llvm.org/viewvc/llvm-project?rev=277900=rev Log: Fix typos from r277797 and unused variable from r277889. Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp cfe/trunk/test/SemaCXX/return-stack-addr-2.cpp Modified:

Re: Diagnostics improvements for 3.9

2016-08-05 Thread Richard Trieu via cfe-commits
Typos and unused test variables fixed in r277900 On Fri, Aug 5, 2016 at 6:46 PM, Richard Smith wrote: > On Fri, Aug 5, 2016 at 6:33 PM, Richard Smith > wrote: > >> These all look OK for the branch. Hans, the second one fixes a crasher, >> so I'd

r277889 - Fix two false positives in -Wreturn-stack-address

2016-08-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Aug 5 18:24:47 2016 New Revision: 277889 URL: http://llvm.org/viewvc/llvm-project?rev=277889=rev Log: Fix two false positives in -Wreturn-stack-address If the return type is a pointer and the function returns the reference to a pointer, don't warn since only the value

r277866 - Fix false positive in -Wunsequenced and templates.

2016-08-05 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Aug 5 16:02:34 2016 New Revision: 277866 URL: http://llvm.org/viewvc/llvm-project?rev=277866=rev Log: Fix false positive in -Wunsequenced and templates. For builtin logical operators, there is a well-defined ordering of argument evaluation. For overloaded operator of

Re: [PATCH] D21675: New ODR checker for modules

2016-08-16 Thread Richard Trieu via cfe-commits
rtrieu updated this revision to Diff 68278. rtrieu added a comment. Add function void ODRHash(llvm::FoldingSetNodeID ) to several classes for computing the hash. Decl, Stmt, TemplateArgument, Type and QualType now have this function, and can call among each others' functions.

r293585 - Add better ODR checking for modules.

2017-01-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Jan 30 19:44:15 2017 New Revision: 293585 URL: http://llvm.org/viewvc/llvm-project?rev=293585=rev Log: Add better ODR checking for modules. When objects are imported for modules, there is a chance that a name collision will cause an ODR violation. Previously, only a

r295284 - Add better ODR checking for modules.

2017-02-15 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 15 22:53:40 2017 New Revision: 295284 URL: http://llvm.org/viewvc/llvm-project?rev=295284=rev Log: Add better ODR checking for modules. Recommit r293585 that was reverted in r293611 with new fixes. The previous issue was determined to be an overly aggressive AST

r295293 - Revert r295284: Add better ODR checking for modules.

2017-02-15 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Feb 16 01:09:18 2017 New Revision: 295293 URL: http://llvm.org/viewvc/llvm-project?rev=295293=rev Log: Revert r295284: Add better ODR checking for modules. Fix modules build bot. Removed: cfe/trunk/include/clang/AST/ODRHash.h cfe/trunk/lib/AST/ODRHash.cpp

r295286 - Loosen a Type check ODR checking to try to fix the build bot.

2017-02-15 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 15 23:48:25 2017 New Revision: 295286 URL: http://llvm.org/viewvc/llvm-project?rev=295286=rev Log: Loosen a Type check ODR checking to try to fix the build bot. Modified: cfe/trunk/lib/Serialization/ASTReader.cpp Modified:

r295800 - Add more ODR checking.

2017-02-21 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Feb 21 19:11:25 2017 New Revision: 295800 URL: http://llvm.org/viewvc/llvm-project?rev=295800=rev Log: Add more ODR checking. Add the basics for the ODRHash class, which will only process Decl's from a whitelist, which currently only has AccessSpecDecl. Different access

r295533 - Part of adding an improved ODR checker.

2017-02-17 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 17 20:09:28 2017 New Revision: 295533 URL: http://llvm.org/viewvc/llvm-project?rev=295533=rev Log: Part of adding an improved ODR checker. Reserve a spot for ODR hash in CXXRecordDecl and in its modules storage. Default the hash value to 0 for all classes.

r295421 - Add better ODR checking for modules.

2017-02-16 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Feb 16 23:54:30 2017 New Revision: 295421 URL: http://llvm.org/viewvc/llvm-project?rev=295421=rev Log: Add better ODR checking for modules. A slightly weaker form of ODR checking than previous attempts, but hopefully won't break the modules build bot. Future work will

r295427 - Revert r295421, new ODR checker for modules, to fix build bot.

2017-02-16 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 17 01:19:24 2017 New Revision: 295427 URL: http://llvm.org/viewvc/llvm-project?rev=295427=rev Log: Revert r295421, new ODR checker for modules, to fix build bot. Removed: cfe/trunk/include/clang/AST/ODRHash.h cfe/trunk/lib/AST/ODRHash.cpp

r296078 - [ODRHash] Add handling of TypedefType and DeclarationName

2017-02-23 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Feb 23 20:59:12 2017 New Revision: 296078 URL: http://llvm.org/viewvc/llvm-project?rev=296078=rev Log: [ODRHash] Add handling of TypedefType and DeclarationName Differential Revision: https://reviews.llvm.org/D21675 Modified:

r295890 - [ODRHash] static_cast and Stmt hashing.

2017-02-22 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 22 16:22:42 2017 New Revision: 295890 URL: http://llvm.org/viewvc/llvm-project?rev=295890=rev Log: [ODRHash] static_cast and Stmt hashing. Add support for static_cast in classes. Add pointer-independent profiling for Stmt's, sharing most of the logic with

r296221 - [ODRHash] Move inherited visitor call to end of function.

2017-02-24 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 24 19:29:34 2017 New Revision: 296221 URL: http://llvm.org/viewvc/llvm-project?rev=296221=rev Log: [ODRHash] Move inherited visitor call to end of function. Modified: cfe/trunk/lib/AST/ODRHash.cpp Modified: cfe/trunk/lib/AST/ODRHash.cpp URL:

r296170 - [ODRHash] Add handling of bitfields

2017-02-24 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 24 14:59:28 2017 New Revision: 296170 URL: http://llvm.org/viewvc/llvm-project?rev=296170=rev Log: [ODRHash] Add handling of bitfields Differential Revision: https://reviews.llvm.org/D21675 Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td

r296198 - [ODRHash] Finish FieldDecl support by handling mutable and initializers.

2017-02-24 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 24 17:35:37 2017 New Revision: 296198 URL: http://llvm.org/viewvc/llvm-project?rev=296198=rev Log: [ODRHash] Finish FieldDecl support by handling mutable and initializers. https://reviews.llvm.org/rL296170 Modified:

r295911 - [ODRHash] Add IdentiferInfo and FieldDecl support.

2017-02-22 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 22 18:23:01 2017 New Revision: 295911 URL: http://llvm.org/viewvc/llvm-project?rev=295911=rev Log: [ODRHash] Add IdentiferInfo and FieldDecl support. IdentifierInfo is hashed based on the stored string. FieldDecl versus other Decl is now detected, as well as

r295931 - [ODRHash] Handle types in ODR hashing.

2017-02-22 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Wed Feb 22 21:25:57 2017 New Revision: 295931 URL: http://llvm.org/viewvc/llvm-project?rev=295931=rev Log: [ODRHash] Handle types in ODR hashing. Fields will now have their types added to the hash, allowing for detection of mismatched field types. This detection allows the

r294815 - Move test include file from include/ to Inputs/

2017-02-10 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Fri Feb 10 18:52:01 2017 New Revision: 294815 URL: http://llvm.org/viewvc/llvm-project?rev=294815=rev Log: Move test include file from include/ to Inputs/ The Inputs/ directory is the recommended location for extra files for test cases. No functional change. Added:

r295125 - Remove unused variable. No functional change.

2017-02-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Feb 14 17:56:55 2017 New Revision: 295125 URL: http://llvm.org/viewvc/llvm-project?rev=295125=rev Log: Remove unused variable. No functional change. Modified: cfe/trunk/lib/Parse/ParseDecl.cpp Modified: cfe/trunk/lib/Parse/ParseDecl.cpp URL:

Re: r296221 - [ODRHash] Move inherited visitor call to end of function.

2017-02-28 Thread Richard Trieu via cfe-commits
was moved (& possibly test cases, or > "NFC" in the description) would be handy here. > > On Fri, Feb 24, 2017 at 5:41 PM Richard Trieu via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rtrieu >> Date: Fri Feb 24 19:29:34 2017 >> New R

r296521 - [ODRHash] Add basic support for CXXRecordDecl

2017-02-28 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Feb 28 15:24:38 2017 New Revision: 296521 URL: http://llvm.org/viewvc/llvm-project?rev=296521=rev Log: [ODRHash] Add basic support for CXXRecordDecl Modified: cfe/trunk/include/clang/Basic/DiagnosticSerializationKinds.td cfe/trunk/lib/AST/ODRHash.cpp

r280157 - Fix memory leak by storing returned pointer in std::unique_ptr

2016-08-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Aug 30 16:12:48 2016 New Revision: 280157 URL: http://llvm.org/viewvc/llvm-project?rev=280157=rev Log: Fix memory leak by storing returned pointer in std::unique_ptr Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL:

r280189 - Concatenate two FileCheck lines in a test.

2016-08-30 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Aug 30 20:57:12 2016 New Revision: 280189 URL: http://llvm.org/viewvc/llvm-project?rev=280189=rev Log: Concatenate two FileCheck lines in a test. 'cc1' is a valid sequence of hexadecimal and sometimes can occur in the path when testing. This can lead to FileCheck

r281286 - Fix interaction between serialization and c++1z feature.

2016-09-12 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Sep 12 20:20:40 2016 New Revision: 281286 URL: http://llvm.org/viewvc/llvm-project?rev=281286=rev Log: Fix interaction between serialization and c++1z feature. In c++1z, static_assert is not required to have a StringLiteral message, where previously it was required.

r281287 - Handle empty message in static_asserts.

2016-09-12 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Sep 12 20:37:01 2016 New Revision: 281287 URL: http://llvm.org/viewvc/llvm-project?rev=281287=rev Log: Handle empty message in static_asserts. Modified: cfe/trunk/tools/libclang/CIndex.cpp Modified: cfe/trunk/tools/libclang/CIndex.cpp URL:

r282555 - Revert r282547 and add test to show correct behavior.

2016-09-27 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Sep 27 18:44:07 2016 New Revision: 282555 URL: http://llvm.org/viewvc/llvm-project?rev=282555=rev Log: Revert r282547 and add test to show correct behavior. Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/test/SemaCXX/cxx0x-defaulted-functions.cpp

Re: r282547 - Fix defaulted member functions for templated classes.

2016-09-27 Thread Richard Trieu via cfe-commits
> X(T) = default; // either copyable or moveable, depending on B > }; > > On Tue, Sep 27, 2016 at 3:28 PM, Richard Trieu via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rtrieu >> Date: Tue Sep 27 17:28:59 2016 >> New Revision: 282547 >&

  1   2   3   >