[PATCH] D82994: [RFC] Instrumenting Clang/LLVM with Perfetto

2020-08-20 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 286866. Nathan-Huckleberry added a comment. - Attach translation unit names to trace processes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82994/new/ https://reviews.llvm.org/D82994 Files:

[PATCH] D82994: [RFC] Instrumenting Clang/LLVM with Perfetto

2020-07-01 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: llvm-commits, cfe-commits, arphaman, hiraditya, mgorny. Herald added projects: clang, LLVM. Nathan-Huckleberry edited the summary of this revision. Nathan-Huckleberry edited the summary of this revision. Nathan-Huckleberry edited

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369791: [Sema] Dont warn on printf(%hd, [char]) (PR41467) (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216893. Nathan-Huckleberry added a comment. - Add if without else Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216884. Nathan-Huckleberry added a comment. - Remove else Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216739. Nathan-Huckleberry added a comment. - Simplify logic for readability Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216730. Nathan-Huckleberry added a comment. - Fix broken logic from previous revision Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216729. Nathan-Huckleberry added a comment. - Remove else and |= Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107 +// All further checking is done on the subexpression +Match = AT.matchesType(S.Context, ExprTy); +if

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216713. Nathan-Huckleberry added a comment. - Add variable for implicit match and fix comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216702. Nathan-Huckleberry added a comment. - Cleanup test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 216699. Nathan-Huckleberry added a comment. - Warn when -Wformat-pedantic is set Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-08-20 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369414: [Attr] Support _attribute__ ((fallthrough)) (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-08-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked 4 inline comments as done. Nathan-Huckleberry added inline comments. Comment at: clang/test/SemaCXX/constexpr-builtin-bit-cast.cpp:360 -constexpr int ok_byte = (__builtin_bit_cast(std::byte[8], pad{1, 2}), 0); -constexpr int ok_uchar =

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-08-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 215699. Nathan-Huckleberry added a comment. - Use ExprEvalContext and remove mangling context code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 Files:

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-15 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. As far as I can tell this case was just overlooked. The original commit adding this change https://reviews.llvm.org/rG0208793e41018ac168412a3da8b2fba70aba9716 only allows chars to int and chars to chars. Another commit ignores typing of chars

[PATCH] D66186: [Sema] Don't warn on printf('%hd', [char]) (PR41467)

2019-08-15 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D66186#1630427 , @aaron.ballman wrote: > There was a request in the linked bug for some code archaeology to see why > this behavior exists in the first place. What were the results of that? I'm > not opposed to

[PATCH] D66186: Fix warning on printf('%hd', [char])

2019-08-13 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 214966. Nathan-Huckleberry added a comment. - Add comment in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66186/new/ https://reviews.llvm.org/D66186 Files: clang/lib/AST/FormatString.cpp

[PATCH] D66186: Fix warning on printf('%hd', [char])

2019-08-13 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Nathan-Huckleberry added a reviewer: rsmith. Nathan-Huckleberry added a subscriber: nickdesaulniers. Link: https://bugs.llvm.org/show_bug.cgi?id=41467 Repository: rG LLVM Github

[PATCH] D65828: [clang-tidy] Add check to linuxkernel for unbalanced irq calls

2019-08-06 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D65828 Files: clang-tools-extra/clang-tidy/linuxkernel/CMakeLists.txt

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-08-05 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:352 SetParamDefaultArgument(Param, DefaultArg, EqualLoc); + CurContext->removeDecl(Param); + CurContext = Cur; rsmith

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-08-05 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 213435. Nathan-Huckleberry added a comment. - Remove 'maybe', remove boolean and fix other call to ParseSimpleDeclaration Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-08-05 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 213407. Nathan-Huckleberry added a comment. - Remove changes from accidentally formatted files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838 Files:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-08-05 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 213406. Nathan-Huckleberry added a comment. - Allow decl-specifier source location to propagate to decl parsing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-08-02 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367694: [clang-tidy] Adding static analyzer check to list of clang-tidy checks (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits.

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-08-01 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 212889. Nathan-Huckleberry added a comment. - Support python2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-29 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 212198. Nathan-Huckleberry added a comment. - Fix test case spacing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838 Files:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-29 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 212189. Nathan-Huckleberry added a comment. - Fix test, formatting and conditional check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838 Files:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 212012. Nathan-Huckleberry added a comment. Herald added a subscriber: arphaman. - Rework attribute parsing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 212014. Nathan-Huckleberry added a comment. - Formatting fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838 Files: clang/include/clang/Basic/Attr.td

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211987. Nathan-Huckleberry added a comment. - Order swap and elif Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files:

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211967. Nathan-Huckleberry added a comment. - Add in-tree as possible default location Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files:

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367134: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. I agree that parsing according to attribute name/type is not a good solution. It sounds like we have narrowed it down to two choices: Do we want to follow the gcc method of parsing once and falling back if parsing fails? Do we want to parse attributes first

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-26 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211958. Nathan-Huckleberry added a comment. - Make filepath optionally user specified Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files:

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-24 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211545. Nathan-Huckleberry added a comment. - Add comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files: clang/lib/Sema/SemaDecl.cpp

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64454#1587102 , @aaron.ballman wrote: > I think this looks reasonable to me, though I am still not certain if the > relative path in the python script will work with both the svn in-tree > directory layout as

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-23 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64838#1593516 , @aaron.ballman wrote: > In D64838#1592520 , > @Nathan-Huckleberry wrote: > > > void foo() { > > __attribute__((address_space(0))) *x; > > *y; > >

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211230. Nathan-Huckleberry added a comment. - Disable self reference checking for C Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files:

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211224. Nathan-Huckleberry added a comment. - Style fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 Files: clang/include/clang/Parse/Parser.h

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211221. Nathan-Huckleberry added a comment. - Style fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 Files: clang/include/clang/Parse/Parser.h

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-22 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 211213. Nathan-Huckleberry added a comment. - Add tracking of declaration of initializers in Sema. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 Files:

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. void foo() { __attribute__((address_space(0))) *x; *y; } If the attributes are parsed then the rest of the statement is identical to: { *x; //this one has attributes now *y; { The first line should be a valid declaration and the

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64838#1592111 , @aaron.ballman wrote: > In D64838#1589770 , > @Nathan-Huckleberry wrote: > > > The main problem that we have is that the `__attribute__` token always > >

[PATCH] D64607: [clang-tidy] Fix crash on end location inside macro

2019-07-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366353: [clang-tidy] Fix crash on end location inside macro (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. The main problem that we have is that the `__attribute__` token always causes the parser to read the line as a declaration. Then the declaration parser handles reading the attributes list. This case demonstrates the problem: void foo() {

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. Revival of https://reviews.llvm.org/D63260 and https://reviews.llvm.org/D63299. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 210215. Nathan-Huckleberry added a comment. - Fixed formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838 Files: clang/include/clang/Basic/Attr.td

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-07-16 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixed extraneous matches of non-NullStmt Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64838 Files: clang/include/clang/Basic/Attr.td

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-15 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked 3 inline comments as done. Nathan-Huckleberry added inline comments. Comment at: clang/test/Sema/warn-uninitialized-statement-expression.c:21 +struct widget z = my_widget; // expected-warning{{variable 'my_widget' is uninitialized when used within

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-15 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209905. Nathan-Huckleberry marked 3 inline comments as done. Nathan-Huckleberry added a comment. - Change cast type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209644. Nathan-Huckleberry added a comment. - Add warning-free test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files:

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209637. Nathan-Huckleberry added a comment. - Fixed style Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files: clang/lib/Sema/SemaDecl.cpp

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209636. Nathan-Huckleberry added a comment. - Adding fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64678/new/ https://reviews.llvm.org/D64678 Files: clang/lib/Sema/SemaDecl.cpp

[PATCH] D64678: [Sema] Fix -Wuninitialized for struct assignment from GNU C statement expression

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Do not automatically self references of structs in statement expression as warnings. Instead wait for uninitialized cfg analysis. https://bugs.llvm.org/show_bug.cgi?id=42604

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209634. Nathan-Huckleberry added a comment. - Forgot to fix list.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files:

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209632. Nathan-Huckleberry added a comment. - Added script for generation of docs based off Checkers.td - Updated to match newly standardized anchor urls - Add auto redirect and remove alpha checkers Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209532. Nathan-Huckleberry added a comment. - Add auto redirect and remove alpha checkers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454 Files:

[PATCH] D64607: [clang-tidy] Fix crash on end location inside macro

2019-07-12 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209524. Nathan-Huckleberry added a comment. - Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64607/new/ https://reviews.llvm.org/D64607 Files:

[PATCH] D64607: [clang-tidy] Fix crash on end location inside macro

2019-07-11 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209381. Nathan-Huckleberry added a comment. - Ran git-clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64607/new/ https://reviews.llvm.org/D64607 Files:

[PATCH] D64607: [clang-tidy] Fix crash on end location inside macro

2019-07-11 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Lexer::getLocForEndOfToken is defined to return an invalid location if the given location is inside a macro. Other checks conditionally warn based off location validity.

[PATCH] D64543: [Docs] Add standardized header links to analyzer doc

2019-07-11 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365797: [Docs] Add standardized header links to analyzer doc (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D64543: [Docs] Add standardized header links to analyzer doc

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209105. Nathan-Huckleberry added a comment. - Fix .m and i.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64543/new/ https://reviews.llvm.org/D64543 Files: clang/docs/analyzer/checkers.rst

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64454#1579481 , @Eugene.Zelenko wrote: > In D64454#1579466 , > @Nathan-Huckleberry wrote: > > > Docs exist for these checks on the analyzer side, they're just all on the >

[PATCH] D64543: [Docs] Add standardized header links to analyzer doc

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209104. Nathan-Huckleberry added a comment. - Fix file periods being converted to dashes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64543/new/ https://reviews.llvm.org/D64543 Files:

[PATCH] D64543: [Docs] Add standardized header links to analyzer doc

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 209103. Nathan-Huckleberry added a comment. - Fixed periods in sentences being dashes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64543/new/ https://reviews.llvm.org/D64543 Files:

[PATCH] D64543: [Docs] Add standardized header links to analyzer doc

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, jfb, Szelethus, a.sidorin, mgrang, baloghadamsoftware. Herald added a project: clang. Header links should have some standard form so clang tidy docs can easily reference them. The form is as

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64454#1579365 , @lebedev.ri wrote: > In D64454#1579336 , @Eugene.Zelenko > wrote: > > > May be script should generate documentation during build, so files .rst > > files

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/clang-analyzer-apiModeling.StdCLibraryFunctions.rst:7 +The clang-analyzer-apiModeling.StdCLibraryFunctions check is an alias,

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-10 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. In D64454#1578352 , @aaron.ballman wrote: > I'm worried that this will continue to drift out of sync with the static > analyzer checks unless we find some way to automate it. I wonder if we could > write a script to

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-09 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added a comment. The contents of each check page are identical other than the check name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64454/new/ https://reviews.llvm.org/D64454

[PATCH] D64454: [clang-tidy] Adding static analyzer check to list of clang-tidy checks

2019-07-09 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware, xazax.hun. Herald added a project: clang. Since clang-tidy supports use of the static analyzer there should be documentation of how to invoke the static

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-03 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 207925. Nathan-Huckleberry added a comment. - Stylistic fixes of function names and removal of namespace prefixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-03 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 207918. Nathan-Huckleberry added a comment. - Small functional and formatting changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63889/new/ https://reviews.llvm.org/D63889 Files:

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-07-03 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry added inline comments. Comment at: clang/lib/Analysis/AnalysisDeclContext.cpp:124 +if(VD->hasGlobalStorage()) { + return const_cast(dyn_cast(VD->getInit())); +} nickdesaulniers wrote: > The `const_cast` doesn't look necessary

[PATCH] D64030: [analyzer] Support kfree in MallocChecker

2019-07-01 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364875: [analyzer] Support kfree in MallocChecker (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D64030: [analyzer] Support kfree in MallocChecker

2019-07-01 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. kmalloc is freed with kfree in the linux kernel. kmalloc support was added

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-27 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364605: [analyzer] Fix clang-tidy crash on GCCAsmStmt (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-27 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 206954. Nathan-Huckleberry added a comment. - Minor style change on assert Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63533/new/ https://reviews.llvm.org/D63533 Files:

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-27 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 206919. Nathan-Huckleberry added a comment. - Add assertion message and simplify test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63533/new/ https://reviews.llvm.org/D63533 Files:

[PATCH] D63889: Check possible warnings on global initializers for reachability

2019-06-27 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Create CFG for initializers and perform analysis based warnings on global variables Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63889 Files:

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/test/Analysis/egraph-asm-goto-no-crash.cpp:1 +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363857: [AST] Fixed extraneous warnings for binary conditional operator (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205642. Nathan-Huckleberry added a comment. - [analyzer] Revise test case and add TODO Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63533/new/ https://reviews.llvm.org/D63533 Files:

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. Added entry in switch statement to recognize GCCAsmStmt as a possible block

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205473. Nathan-Huckleberry added a comment. Mistakenly updated revision. Attempting to revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369 Files:

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-18 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205470. Nathan-Huckleberry added a comment. - [analyzer] Fix clang-tidy crash on GCCAsmStmt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369 Files:

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205129. Nathan-Huckleberry added a comment. - [AST] Formatting changes to ConditionalOperator unused detection Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-17 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205117. Nathan-Huckleberry added a comment. - [AST] Cleanup of conditional operator unused warning detection Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63369/new/ https://reviews.llvm.org/D63369

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-14 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Binary conditional operator gave warnings where ternary operators did not. They have been fixed to warn similarly to ternary operators. Link: