[PATCH] D54017: [analyzer] NullabilityChecker: Invariant violation should only be triggered for symbols.

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ reopened this revision. NoQ added a comment. This revision is now accepted and ready to land. Reverted as rC347956 due to http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/26658 - will have a look tomorrow. Repository: rC Clang CHAN

r347956 - Revert r344580 "[analyzer] Nullability: Don't detect post factum violation..."

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 20:26:17 2018 New Revision: 347956 URL: http://llvm.org/viewvc/llvm-project?rev=347956&view=rev Log: Revert r344580 "[analyzer] Nullability: Don't detect post factum violation..." Fails under ASan! Removed: cfe/trunk/test/Analysis/nullability-arc.mm Mod

[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

2018-11-29 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg marked 2 inline comments as done. andrewjcg added a comment. > I don't think we need to change the serialization format for this: a > serialized path beginning with / is already treated as absolute and any other > path is already treated as relative, so we don't need a flag to carry th

r347955 - [analyzer] MallocChecker: Avoid redundant transitions.

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 19:52:42 2018 New Revision: 347955 URL: http://llvm.org/viewvc/llvm-project?rev=347955&view=rev Log: [analyzer] MallocChecker: Avoid redundant transitions. Don't generate a checker-tagged node unconditionally on the first checkDeadSymbols callback when no pointe

[PATCH] D54013: [analyzer] NFC: MallocChecker: Avoid redundant transitions.

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2383-2384 + if (RS == OldRS) +return; + NoQ wrote: > Szelethus wrote: > > Hmmm, I guess we return here because if `RegionState` is un

[PATCH] D54013: [analyzer] NFC: MallocChecker: Avoid redundant transitions.

2018-11-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347955: [analyzer] MallocChecker: Avoid redundant transitions. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D54013?vs=172629&id=176030#toc Repository: rC

[PATCH] D54013: [analyzer] NFC: MallocChecker: Avoid redundant transitions.

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/MallocChecker.cpp:2383-2384 + if (RS == OldRS) +return; + Szelethus wrote: > Hmmm, I guess we return here because if `RegionState` is unchanged, so should > be `ReallocPairs` and `FreeRetu

[PATCH] D54017: [analyzer] NullabilityChecker: Invariant violation should only be triggered for symbols.

2018-11-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347954: [analyzer] Nullability: Don't detect post factum violation on concrete values. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/

r347954 - [analyzer] Nullability: Don't detect post factum violation on concrete values.

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 19:39:58 2018 New Revision: 347954 URL: http://llvm.org/viewvc/llvm-project?rev=347954&view=rev Log: [analyzer] Nullability: Don't detect post factum violation on concrete values. The checker suppresses warnings on paths on which a nonnull value is assumed to be

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-11-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347953: [analyzer] Fix the "Zombie Symbols" bug. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D18860/new/ https://reviews.llvm.org/

r347953 - [analyzer] Fix the "Zombie Symbols" bug.

2018-11-29 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Nov 29 19:27:50 2018 New Revision: 347953 URL: http://llvm.org/viewvc/llvm-project?rev=347953&view=rev Log: [analyzer] Fix the "Zombie Symbols" bug. It's an old bug that consists in stale references to symbols remaining in the GDM if they disappear from other program s

[PATCH] D54923: [Modules] Remove non-determinism while serializing DECL_CONTEXT_LEXICAL and DECL_RECORD

2018-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. @rsmith this is on the non-determinism issue we discussed offline. Do you have any concerns with this approach? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54923/new/ https://reviews.llvm.org/D54923 ___ cfe-commits

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:67 + FixedPointSemantics + getCommonSemantics(const FixedPointSemantics &Other) const; + leonardchan wrote: > rjmccall wrote: > > Actually representing the fully-precise value is

[PATCH] D53692: [analyzer] Evaluate all non-checker config options before analysis

2018-11-29 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In D53692#1313956 , @NoQ wrote: > In D53692#1293781 , @NoQ wrote: > > > In D53692#1293778 , @Szelethus > > wrote: > > > > > Did you know that clan

[PATCH] D54816: [RISCV] Mark unit tests as "requires: riscv-registered-target"

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Since this was reverted in rC347689 , is it ok to remove the empty `Driver` directory from the repo as well? Noticed by trying to do shell auto-complete for stuff like `D54816.diff` by just typing `D` :) Repository: rL LLVM CHANGES SIN

[PATCH] D18860: [analyzer] Fix the "Zombie symbols" issue.

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > I'd very strongly prefer to have this goldnugget copy-pasted even to a simple > txt file, and have it commited with this patch. I guess i'll do it a bit later because it needs to be cleaned up after the behavior changes with this patch. There are a few other such discussi

[PATCH] D54880: Ignore gcc's stack-clash-protection flag

2018-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Looks like adding a test in `test/Driver/clang_f_opts.c` would be good here. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54880/new/ https://reviews.llvm.org/D54880 ___ cfe-commits mailing lis

[PATCH] D53692: [analyzer] Evaluate all non-checker config options before analysis

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Herald added subscribers: gamesh411, baloghadamsoftware. In D53692#1293781 , @NoQ wrote: > In D53692#1293778 , @Szelethus wrote: > > > Did you know that clang unit tests do not run with check-cl

[PATCH] D53076: [analyzer] Enhance ConditionBRVisitor to write out more information

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. There still seem to be a couple of regressions with `Assuming...` pieces, but other than that, i believe that an awesome piece of progress has been made here. I really like how it looks now. I agree with George that dropping "Knowing" from the message looks fancier.

[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

2018-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Thanks for working on this @andrewjcg In D51568#1313717 , @rsmith wrote: > I'm also not convinced we need to put this behind a flag. It would seem > reasonable to me to simply always emit the `MODULE_DIRECTORY` as relative (if > w

r347950 - [analyzer] RetainCountChecker for OSObject model the "free" call

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:19:16 2018 New Revision: 347950 URL: http://llvm.org/viewvc/llvm-project?rev=347950&view=rev Log: [analyzer] RetainCountChecker for OSObject model the "free" call The "free" call frees the object immediately, ignoring the reference count. Sadly, it is

r347945 - [analyzer] For OSObject, trust that functions starting with Get

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:18:10 2018 New Revision: 347945 URL: http://llvm.org/viewvc/llvm-project?rev=347945&view=rev Log: [analyzer] For OSObject, trust that functions starting with Get (uppercase) are also getters. Differential Revision: https://reviews.llvm.org/D55035 Mod

r347949 - [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:19:03 2018 New Revision: 347949 URL: http://llvm.org/viewvc/llvm-project?rev=347949&view=rev Log: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new" Differential Revision: https://reviews.llvm.org/D5

[PATCH] D55076: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new"

2018-11-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347949: [analyzer] RetainCountChecker: recognize that OSObject can be created directly… (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: ht

[PATCH] D55041: [analyzer] Switch retain count checker for OSObject to use OS_* attributes

2018-11-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347948: [analyzer] Switch retain count checker for OSObject to use OS_* attributes (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https:/

r347941 - [analyzer] [NFC] Test dumping trimmed graph

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:17:18 2018 New Revision: 347941 URL: http://llvm.org/viewvc/llvm-project?rev=347941&view=rev Log: [analyzer] [NFC] Test dumping trimmed graph Differential Revision: https://reviews.llvm.org/D54972 Modified: cfe/trunk/test/Analysis/dump_egraph.c M

r347947 - [attributes] Add a family of OS_CONSUMED, OS_RETURNS and OS_RETURNS_RETAINED attributes

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:18:37 2018 New Revision: 347947 URL: http://llvm.org/viewvc/llvm-project?rev=347947&view=rev Log: [attributes] Add a family of OS_CONSUMED, OS_RETURNS and OS_RETURNS_RETAINED attributes The addition adds three attributes for communicating ownership, a

r347943 - [analyzer] Add the type of the leaked object to the diagnostic message

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:17:44 2018 New Revision: 347943 URL: http://llvm.org/viewvc/llvm-project?rev=347943&view=rev Log: [analyzer] Add the type of the leaked object to the diagnostic message If the object is a temporary, and there is no variable it binds to, let's at least

[PATCH] D55033: [analyzer] Add the type of the leaked object to the diagnostic message

2018-11-29 Thread George Karpenkov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347943: [analyzer] Add the type of the leaked object to the diagnostic message (authored by george.karpenkov, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://rev

r347940 - [analyzer] [NFC] Some miscellaneous clean ups and documentation fixes.

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:17:05 2018 New Revision: 347940 URL: http://llvm.org/viewvc/llvm-project?rev=347940&view=rev Log: [analyzer] [NFC] Some miscellaneous clean ups and documentation fixes. Differential Revision: https://reviews.llvm.org/D54971 Modified: cfe/trunk/inc

r347944 - [analyzer] Print a fully qualified name for functions in RetainCountChecker diagnostics

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:17:57 2018 New Revision: 347944 URL: http://llvm.org/viewvc/llvm-project?rev=347944&view=rev Log: [analyzer] Print a fully qualified name for functions in RetainCountChecker diagnostics Attempt to get a fully qualified name from AST if an SVal corresp

r347951 - [analyzer] Fixes after rebase.

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:19:29 2018 New Revision: 347951 URL: http://llvm.org/viewvc/llvm-project?rev=347951&view=rev Log: [analyzer] Fixes after rebase. Modified: cfe/trunk/test/Analysis/osobject-retain-release.cpp cfe/trunk/test/Misc/pragma-attribute-supported-attrib

r347946 - [analyzer] [NFC] Minor refactoring of RetainCountDiagnostics

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:18:23 2018 New Revision: 347946 URL: http://llvm.org/viewvc/llvm-project?rev=347946&view=rev Log: [analyzer] [NFC] Minor refactoring of RetainCountDiagnostics Move visitors to the implementation file, move a complicated logic into a function. Differen

r347948 - [analyzer] Switch retain count checker for OSObject to use OS_* attributes

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:18:50 2018 New Revision: 347948 URL: http://llvm.org/viewvc/llvm-project?rev=347948&view=rev Log: [analyzer] Switch retain count checker for OSObject to use OS_* attributes Instead of generalized reference counting annotations. Differential Revision:

r347942 - [analyzer] Reference leaked object by name, even if it was created in an inlined function.

2018-11-29 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Thu Nov 29 18:17:31 2018 New Revision: 347942 URL: http://llvm.org/viewvc/llvm-project?rev=347942&view=rev Log: [analyzer] Reference leaked object by name, even if it was created in an inlined function. rdar://45532181 Differential Revision: https://reviews.llvm.o

[PATCH] D52967: Extend shelf-life by 70 years

2018-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. I'm assuming this is a patch from a time traveller who has come back from 11 years in the future seeking to prevent some disaster, after this test case somehow becomes part of some critical infrastructure. Definitely don't want to stand in

[PATCH] D55101: [clang-tidy] Ignore namespaced and C++ member functions in google-objc-function-naming check 🙈

2018-11-29 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore created this revision. stephanemoore added reviewers: benhamilton, aaron.ballman. Herald added subscribers: cfe-commits, xazax.hun. The google-objc-function-naming check applies to functions that are not namespaced and should not be applied to C++ member functions. Such function de

[PATCH] D52967: Extend shelf-life by 70 years

2018-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Out of curiosity, why? If it makes you happy though, go for it! LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52967/new/ https://reviews.llvm.org/D52967

[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/ExprConstant.cpp:4278-4287 +// Evaluate try blocks by evaluating all sub statements and keep track +// whether there's a return. +EvalStmtResult ESR = ESR_Succeeded; +for (const Stmt *SubStmt : S->children()) { +

[PATCH] D55097: [constexpr][c++2a] Try-catch blocks in constexpr functions

2018-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno created this revision. bruno added reviewers: rsmith, ahatanak, erik.pilkington. Herald added subscribers: dexonsmith, jkorous. Implement support for try-catch blocks in constexpr functions, as proposed in http://wg21.link/P1002 and voted in San Diego for c++20. The idea is that we can stil

[PATCH] D54737: [clang-tidy] Add the abseil-duration-comparison check

2018-11-29 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked an inline comment as done. hwright added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54737/new/ https://reviews.llvm.org/D54737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D52984: [analyzer] Checker reviewer's checklist

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Herald added a subscriber: gamesh411. Comment at: www/analyzer/checker_dev_manual.html:678 +Making Your Check Better + Probably `Checker` here as well. Comment at: www/analyzer/checker_dev_manual.html:681 +User faci

[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

2018-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I don't think we need to change the serialization format for this: a serialized path beginning with / is already treated as absolute and any other path is already treated as relative, so we don't need a flag to carry that information. I'm also not convinced we need to pu

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-29 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added a comment. Thanks! Comment at: lib/Frontend/CompilerInvocation.cpp:363 + A->claim(); Opts.Config[key] = val; } NoQ wrote: > Maybe we can eventually turn this into an array and address

[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:502 + + auto AssertM = callExpr(callee(functionDecl(hasName("assert"; + auto GuardM = Szelethus wrote: > Szelethus wrote: > > NoQ wrote: >

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55067#1313480 , @arsenm wrote: > I don't understand why there's a discrepancy in this case. Why does anything > think the alignment of a packed struct is anything other than 1? Why is the C > alignment claiming something hig

[PATCH] D50256: [Analyzer] [WIP] Basic support for multiplication and division in the constraint manager (for == and != only)

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I guess that's roughly the way to go if we want to expand `RangeConstraintManager` with more math. One important thing to test here, that doesn't seem to be tested, is what happens when the integer and the scale value are of different types. This may occur because we don't

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-29 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 175982. aprantl added a comment. Bugfix for LexicalBlockFiles + testcase updates. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://reviews.llvm.org/D55085 Files: lib/CodeGen/CGDebugInfo.cpp test/CodeGen/debug-info-abspath.c te

[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

2018-11-29 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. In D54557#1313382 , @NoQ wrote: > In D54557#1301896 , @Szelethus wrote: > > > Wasn't the point of this patch to turn off part of this checkers > > functi

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-29 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Seems OK to me CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55085/new/ https://reviews.llvm.org/D55085 ___ cfe-commits mailing list

[PATCH] D55085: Avoid emitting redundant or unusable directories in DIFile metadata entries

2018-11-29 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl created this revision. aprantl added reviewers: dblaikie, probinson. aprantl added a project: debug-info. As discussed on llvm-dev today, Clang currently emits redundant directories in DIFile entries, such as `.file 1 "/Volumes/Data/llvm" "/Volumes/Data/llvm/tools/clang/test/CodeGen/de

[PATCH] D55083: Re-arrange content in FunctionDecl dump

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Output all content which is local to the FunctionDecl before traversing to child AST nodes. Repository: rC Clang https://reviews.llvm.org/D55083 Files: lib/AST/ASTDumper.cpp

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Ah, `test/Misc/ast-dump-comment.cpp` is existing test coverage for this indeed, great. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55069/new/ https://reviews.llvm.org/D55069 ___ cfe-commi

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. The follow-up patch didn't build anymore with the `&&`. ../tools/clang/lib/AST/ASTDumper.cpp:2672:75: error: cannot bind rvalue reference of type ‘const clang::comments::FullComment*&&’ to lvalue of type ‘const clang::comments::FullComment* const’ ConstComment

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-11-29 Thread Matt Davis via Phabricator via cfe-commits
mattd marked an inline comment as done. mattd added a comment. Thanks for the reviews and added example. I'll update the logic to account for the return type, and add @Rakete 's example to the existing test. Comment at: lib/Sema/SemaDecl.cpp:10225 + llvm::any

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-11-29 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: lib/Headers/__stddef_max_align_t.h:40 __attribute__((__aligned__(__alignof__(long double; +#ifdef __i386__ + __float128 __clang_max_align_nonce3 uweigand wrote: > jyknight wrote: > > Can you fix clang to con

[PATCH] D55070: Replace FullComment member being visited with parameter

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175966. steveire added a comment. Remove && Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55070/new/ https://reviews.llvm.org/D55070 Files: include/clang/AST/CommentVisitor.h lib/AST/ASTDumper.cpp Index: lib/AST/ASTDum

[PATCH] D55070: Replace FullComment member being visited with parameter

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175963. steveire added a comment. Remove param Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55070/new/ https://reviews.llvm.org/D55070 Files: lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp ==

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 175965. leonardchan marked 14 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53738/new/ https://reviews.llvm.org/D53738 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Type.h

[PATCH] D55037: [-gmodules] Honor -fdebug-prefix-map in the debug info inside PCMs.

2018-11-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347926: [-gmodules] Honor -fdebug-prefix-map in the debug info inside PCMs. (authored by adrian, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55037/new/ h

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/include/clang/Basic/FixedPoint.h:67 + FixedPointSemantics + getCommonSemantics(const FixedPointSemantics &Other) const; + rjmccall wrote: > Actually representing the fully-precise value is operation-specific;

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175962. steveire added a comment. Add && Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55069/new/ https://reviews.llvm.org/D55069 Files: include/clang/AST/CommentVisitor.h Index: include/clang/AST/CommentVisitor.h =

r347926 - [-gmodules] Honor -fdebug-prefix-map in the debug info inside PCMs.

2018-11-29 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Thu Nov 29 14:33:09 2018 New Revision: 347926 URL: http://llvm.org/viewvc/llvm-project?rev=347926&view=rev Log: [-gmodules] Honor -fdebug-prefix-map in the debug info inside PCMs. This patch passes -fdebug-prefix-map (a feature for renaming source paths in the debug info) thr

[PATCH] D55070: Replace FullComment member being visited with parameter

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175968. steveire added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55070/new/ https://reviews.llvm.org/D55070 Files: lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175967. steveire added a comment. Remove && Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55069/new/ https://reviews.llvm.org/D55069 Files: include/clang/AST/CommentVisitor.h Index: include/clang/AST/CommentVisitor.h ==

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. I'm not aware of existing test coverage for any of this. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55069/new/ https://reviews.llvm.org/D55069 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175960. steveire added a comment. Add && Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55069/new/ https://reviews.llvm.org/D55069 Files: include/clang/AST/CommentVisitor.h Index: include/clang/AST/CommentVisitor.h =

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Headers/__stddef_max_align_t.h:44 +#endif } max_align_t; #endif I don't want to hold up the immediate fix in this patch for this, but... we should move the definition of this type from the header into clang itself,

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 2 inline comments as done. steveire added inline comments. Comment at: lib/AST/ASTDumper.cpp:1987 +ConstStmtVisitor::Visit(S); + aaron.ballman wrote: > Was there something special about calling the Visit methods directly and > bailing out?

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I don't understand why there's a discrepancy in this case. Why does anything think the alignment of a packed struct is anything other than 1? Why is the C alignment claiming something higher? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55067/new/ https://revi

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-11-29 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley accepted this revision. delesley added a comment. Just to be clear, I'm approving the change, but I'd still like the methods to be renamed. :-) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52578/new/ https://reviews.llvm.org/D52578

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-11-29 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 175956. steveire added a comment. Use isa instead of dyn_cast Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55068/new/ https://reviews.llvm.org/D55068 Files: lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp ==

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-11-29 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. It seems like this check isn't really doing enough to catch this break in full generality. For instance, the mangling of the following changes from C++14 to 17, but isn't diagnosed here: template struct something {}; void f(something) {} The right thing to

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:205 +auto *Aux = CGM.getContext().getAuxTargetInfo(); +if (Aux && Aux->getTriple().getArch() == llvm::Triple::amdgcn) { + auto *ArgTy = Arg->getType()->getPointerElementType(); yaxunl

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: test/clang-tidy/bugprone-branch-clone.cpp:4 +void test_basic1(int in, int &out) { + if (in > 77) +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bugprone-branch-clone] dona

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-11-29 Thread Ulrich Weigand via Phabricator via cfe-commits
uweigand added inline comments. Comment at: lib/Headers/__stddef_max_align_t.h:40 __attribute__((__aligned__(__alignof__(long double; +#ifdef __i386__ + __float128 __clang_max_align_nonce3 jyknight wrote: > Can you fix clang to consistently define `__

[PATCH] D54757: [clang-tidy] new check: bugprone-branch-clone

2018-11-29 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy marked an inline comment as done. donat.nagy added inline comments. Comment at: test/clang-tidy/bugprone-branch-clone.cpp:4 +void test_basic1(int in, int &out) { + if (in > 77) +// CHECK-MESSAGES: :[[@LINE-1]]:3: warning: if with identical then and else branches [bug

[PATCH] D54986: Make CodeGen choose when to emit vtables.

2018-11-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/RecordLayoutBuilder.cpp:3069 const Decl *Result = Entry ? Entry.get(getExternalSource()) : computeKeyFunction(*this, RD); rsmith wrote: > rjmccall wrote: > > Why not just change `computeKeyFunction`

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I understand that it's copied into a properly-aligned local variable, but if it affects how the function is called, that's also part of the ABI, and it should be taken from the C alignment, not any vagaries of how struct types are translated into IR. The other reason

[PATCH] D55037: [-gmodules] Honor -fdebug-prefix-map in the debug info inside PCMs.

2018-11-29 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55037/new/ https://reviews.llvm.org/D55037 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D54986: Make CodeGen choose when to emit vtables.

2018-11-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith marked an inline comment as done. rsmith added a comment. In D54986#1312435 , @lebedev.ri wrote: > Will `-fforce-emit-vtables` still work? Yes, it still works. (The tests for it still pass and I've manually tested it too.) Com

r347919 - [OPENMP][NVPTX]Call get __kmpc_global_thread_num in worker after

2018-11-29 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Nov 29 13:21:32 2018 New Revision: 347919 URL: http://llvm.org/viewvc/llvm-project?rev=347919&view=rev Log: [OPENMP][NVPTX]Call get __kmpc_global_thread_num in worker after initialization. Function __kmpc_global_thread_num should be called only after initialization, not

[PATCH] D55051: [Analyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Whoops, i was reviewing so quickly i didn't notice other comments :D I still believe that this needs a regression test, for the same reason for which we need tests at all. If the deadline for committing comes before you manage to reduce the test case, please commit, but ple

[PATCH] D55051: [Analyzer] [HOTFIX!] SValBuilder crash when `aggressive-binary-operation-simplification` enabled

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Test? Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:485 + // Substracting unsigned integers is a nightmare. + if (!SingleTy->isSignedIntegerOrEnumerationType()) I guess it's no longer only about subtracting? Repository:

[PATCH] D54557: [analyzer] MoveChecker Pt.2: Restrict the warning to STL objects and locals.

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D54557#1301896 , @Szelethus wrote: > Wasn't the point of this patch to turn off part of this checkers > functionality because it's immature just yet? From what I understand it is > desired, but the FP rate is a little too high. I

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D55067#1313364 , @arsenm wrote: > In D55067#1313264 , @yaxunl wrote: > > > In D55067#1313213 , @rjmccall > > wrote: > > > > > This seems backwards

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D55067#1313264 , @yaxunl wrote: > In D55067#1313213 , @rjmccall wrote: > > > This seems backwards. Clang knows what the actual ABI alignment of the C > > type is, and it doesn't have to

[PATCH] D55057: [Headers] Make max_align_t match GCC's implementation.

2018-11-29 Thread James Y Knight via Phabricator via cfe-commits
jyknight added inline comments. Comment at: lib/Headers/__stddef_max_align_t.h:40 __attribute__((__aligned__(__alignof__(long double; +#ifdef __i386__ + __float128 __clang_max_align_nonce3 Can you fix clang to consistently define `__SIZEOF_FLOAT128__`

r347915 - [OpenMP] Add a new version of the SPMD deinit kernel function

2018-11-29 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Thu Nov 29 12:53:49 2018 New Revision: 347915 URL: http://llvm.org/viewvc/llvm-project?rev=347915&view=rev Log: [OpenMP] Add a new version of the SPMD deinit kernel function Summary: This patch adds a new runtime for the SPMD deinit kernel function which replaces the previo

[PATCH] D54970: [OpenMP] Add a new version of the SPMD deinit kernel function

2018-11-29 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347915: [OpenMP] Add a new version of the SPMD deinit kernel function (authored by gbercea, committed by ). Changed prior to commit: https://reviews.llvm.org/D54970?vs=175573&id=175940#toc Repository:

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D55067#1313290 , @yaxunl wrote: > In D55067#1313213 , @rjmccall wrote: > > > This seems backwards. Clang knows what the actual ABI alignment of the C > > type is, and it doesn't have to

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D55067#1313213 , @rjmccall wrote: > This seems backwards. Clang knows what the actual ABI alignment of the C > type is, and it doesn't have to match the alignment of the IR type that IRGen > produces. It's the actual C ABI al

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55069#1313276 , @aaron.ballman wrote: > Overall this seems reasonable, but this change is currently a no-op because > nothing is using this -- what's the plan for using and testing these changes? The answer is: D55070

[PATCH] D55070: Replace FullComment member being visited with parameter

2018-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This is a really nice cleanup, thank you! Comment at: lib/AST/ASTDumper.cpp:114-115 +public ConstStmtVisitor, +public CommentVisitorBase, +public TypeVisitor { Why not inherit from `ConstCommentVisitor` ins

[PATCH] D55067: [HIP] Fix offset of kernel argument for AMDGPU target

2018-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D55067#1313213 , @rjmccall wrote: > This seems backwards. Clang knows what the actual ABI alignment of the C > type is, and it doesn't have to match the alignment of the IR type that IRGen > produces. It's the actual C ABI al

[PATCH] D55069: Extend the CommentVisitor with parameter types

2018-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Overall this seems reasonable, but this change is currently a no-op because nothing is using this -- what's the plan for using and testing these changes? Comment at: include/clang/AST/CommentVisitor.h:31 - RetTy Visit(PTR(Comment) C) { + RetT

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/ASTDumper.cpp:1987 +ConstStmtVisitor::Visit(S); + Was there something special about calling the Visit methods directly and bailing out? Your code certainly looks reasonable, but I wonder if the outpu

Re: [cfe-dev] Dumping AST information to other formats

2018-11-29 Thread George Karpenkov via cfe-commits
Hi Aaron, You might find useful the recent work we have done on stable identifiers for AST: now Stmt and Decl classes have a “getID” method, which returns an identifier stable across different runs (at least on the same architecture, probably not the same for different ones). George > On Nov 2

[PATCH] D53280: [analyzer] Emit an error for invalid -analyzer-config inputs

2018-11-29 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. Thanks, this looks great! Comment at: lib/Frontend/CompilerInvocation.cpp:363 + A->claim(); Opts.Config[key] = val; } Maybe we can eventually turn this into an array and address by index that's

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 175920. arsenm added a comment. Add tests without fp64 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55023/new/ https://reviews.llvm.org/D55023 Files: include/clang/AST/FormatString.h lib/AST/FormatString.cpp lib/AST/FormatStringParsing.h li

  1   2   3   >