[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-11-29 Thread Max Moroz via Phabricator via cfe-commits
Dor1s created this revision. Dor1s added reviewers: eugenis, kcc. Herald added a subscriber: cfe-commits. Looks like the documentation is out of date, given that static linking is not only supported these days, but is actually a default mode. Repository: rC Clang

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread James Findley via Phabricator via cfe-commits
jfindley marked an inline comment as done. jfindley added a comment. In D55052#1313048 , @ioeric wrote: > James, do you have commit access to llvm? If not, I'm happy to land the patch > for you. I do not have commit access - if you could land it that

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

2018-11-29 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/bugprone/BranchCloneCheck.cpp:31 +/// an if/else if/else chain is one statement (which may be a CompoundStmt). +using SwitchBranch = llvm::SmallVector; +} // anonymous namespace donat.nagy wrote: >

[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/ASTContext.cpp:9801 + RD->getTemplateSpecializationKind() == + TSK_ExplicitInstantiationDefinition; else Does it matter if it's not this particular declaration that's the explicit

[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

[PATCH] D52986: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__

2018-11-29 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347888: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__ (authored by Szelethus, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52986/new/

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-29 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Headers.h:64 +// Important: The graph generated by those callbacks might contain cycles and +// self edges. using IncludeGraph = llvm::StringMap; And multi-edges too, right? Even though they're not useful.

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: unittests/clangd/IndexActionTests.cpp:168 + std::string MainFilePath = testPath("main.cpp"); + std::pair CommonHeader = {testPath("common.h"), + R"cpp(

[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/AST/ASTContext.h:2638 + // type. + QualType getCorrespondingSignedFixedPointType(QualType Ty) const; + Please include in the comment here that, unlike `getCorrespondingUnsignedType`, this has to

[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

[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] 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:

[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

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=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 previous

[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=175940#toc Repository:

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

2018-11-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > It's certainly interesting to degenerate integer-with-fixedpoint to just a > mul (since the scaling factor is 2^-n * 2^0, which is just 2^-n), but in the > general case you can't avoid doing the scale alignment. Unless I'm missing > something. No you're right.

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. James, do you have commit access to llvm? If not, I'm happy to land the patch for you. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55052/new/ https://reviews.llvm.org/D55052 ___ cfe-commits mailing list

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-29 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: cfe/trunk/lib/CodeGen/CGExpr.cpp:4268 +DestTy.getAddressSpace(), ConvertType(DestTy)); +return MakeNaturalAlignPointeeAddrLValue(V, DestTy); + } romanovvlad wrote: > Hi, > > It seems this code doesn't

[PATCH] D55065: [clangd] Drop injected class name when class scope is not explicitly specified.

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. E.g. allow injected "A::A" in `using A::A^` but not in "A^". Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55065 Files:

r347892 - Add missing REQUIRES to new test

2018-11-29 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Thu Nov 29 10:02:31 2018 New Revision: 347892 URL: http://llvm.org/viewvc/llvm-project?rev=347892=rev Log: Add missing REQUIRES to new test Test added in r347887 requires an x86 target. Modified: cfe/trunk/test/CodeGen/thinlto_backend_local_name_conflict.ll

[PATCH] D55052: Fix junk output in clangd vscode plugin

2018-11-29 Thread James Findley via Phabricator via cfe-commits
jfindley updated this revision to Diff 175897. jfindley added a comment. Changed the comment to be a little more helpful. I used 'output' rather than errors because depending on verbosity level it can be more than just errors printed. CHANGES SINCE LAST ACTION

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

2018-11-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, arsenm, rjmccall. Herald added subscribers: t-tye, tpr, dstuttard, wdng, kzhuravl. Clang emits call of hipSetupArgument(arg, size, offset) in host IR to set up arguments for a HIP kernel. The offset should meet the expection of the

r347901 - NFC: Fix case of CommentVisitor::Visit methods

2018-11-29 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Nov 29 11:31:32 2018 New Revision: 347901 URL: http://llvm.org/viewvc/llvm-project?rev=347901=rev Log: NFC: Fix case of CommentVisitor::Visit methods This difference is very visible because it is used with other Visitor classes together. Modified:

[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. 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 alignment that's supposed to affect the calling convention, so there needs to be

[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) { +

[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

[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

[PATCH] D54428: [clangd][WIP] XPC transport layer, framework, test-client

2018-11-29 Thread Jan Korous via Phabricator via cfe-commits
jkorous added reviewers: ilya-biryukov, ioeric. jkorous added a comment. Since AFAIK Sam is off until the end of the year I am adding more reviewers. Comment at: tool/ClangdMain.cpp:329 +if (getenv("CLANGD_AS_XPC_SERVICE")) + return newXPCransport(); +#endif

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. Partitions include graphs in auto-index so that each shards contains only part of the include graph related to itself. Repository: rCTE Clang

[PATCH] D55054: [clang] Fill RealPathName for virtual files.

2018-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 175898. kadircet added a comment. - Update tests Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55054/new/ https://reviews.llvm.org/D55054 Files: include/clang/Basic/FileManager.h lib/Basic/FileManager.cpp

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-11-29 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Looks good! Some suggested minor tweaks to diagnostic text inline. Comment at: test/Analysis/use-after-move.cpp:146 +A b = std::move(a); // expected-note {{Object 'a' is moved}} +b = a; // expected-warning {{Moved-from object is

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-29 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. weak new/delete may solve this particular problem, but may cause confusion to lots of other users, e.g. in cases when a user has overridden new/delete for non-essential reasons (e.g. debuging) and can disable the overrides in asan mode. With weak symbols such a user will

[PATCH] D54428: [clangd][WIP] XPC transport layer, framework, test-client

2018-11-29 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 175884. jkorous marked 19 inline comments as done. jkorous retitled this revision from "[clangd] XPC transport layer, framework, test-client" to "[clangd][WIP] XPC transport layer, framework, test-client". jkorous edited the summary of this revision. jkorous

[PATCH] D55061: [clangd] Penalize destructor and overloaded operators in code completion.

2018-11-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55061 Files: clangd/Quality.cpp clangd/Quality.h

[PATCH] D55023: OpenCL: Improve vector printf warnings

2018-11-29 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: test/SemaOpenCL/printf-format-strings.cl:65 +{ +printf("%v4f\n", arg); // expected-warning {{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type

[PATCH] D54964: Add test about __builtin_constant_p

2018-11-29 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347895: Simplify the __builtin_constant_p test that was used to catch rC347417 failure (authored by MaskRay, committed by ). Changed prior to commit:

r347895 - Simplify the __builtin_constant_p test that was used to catch rC347417 failure

2018-11-29 Thread Fangrui Song via cfe-commits
Author: maskray Date: Thu Nov 29 10:26:39 2018 New Revision: 347895 URL: http://llvm.org/viewvc/llvm-project?rev=347895=rev Log: Simplify the __builtin_constant_p test that was used to catch rC347417 failure Reviewers: rsmith, void, shafik Reviewed By: void Subscribers: kristina, cfe-commits

[PATCH] D55029: set default max-page-size to 4KB in lld for Android Aarch64

2018-11-29 Thread Zhizhou Yang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC347897: set default max-page-size to 4KB in lld for Android Aarch64 (authored by zhizhouy, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55029/new/

r347900 - NFC: Move ColorScope to global scope

2018-11-29 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Nov 29 11:30:37 2018 New Revision: 347900 URL: http://llvm.org/viewvc/llvm-project?rev=347900=rev Log: NFC: Move ColorScope to global scope Modified: cfe/trunk/lib/AST/ASTDumper.cpp Modified: cfe/trunk/lib/AST/ASTDumper.cpp URL:

r347899 - NFC: Constify ShowColors

2018-11-29 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Nov 29 11:30:08 2018 New Revision: 347899 URL: http://llvm.org/viewvc/llvm-project?rev=347899=rev Log: NFC: Constify ShowColors Modified: cfe/trunk/lib/AST/ASTDumper.cpp Modified: cfe/trunk/lib/AST/ASTDumper.cpp URL:

Re: r347901 - NFC: Fix case of CommentVisitor::Visit methods

2018-11-29 Thread Aaron Ballman via cfe-commits
On Thu, Nov 29, 2018 at 2:34 PM Stephen Kelly via cfe-commits wrote: > > Author: steveire > Date: Thu Nov 29 11:31:32 2018 > New Revision: 347901 > > URL: http://llvm.org/viewvc/llvm-project?rev=347901=rev > Log: > NFC: Fix case of CommentVisitor::Visit methods > > This difference is very visible

[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`

[PATCH] D54999: [clangd] Populate include graph during static indexing action.

2018-11-29 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 175899. kadircet marked 4 inline comments as done. kadircet added a comment. - Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54999/new/ https://reviews.llvm.org/D54999 Files:

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-29 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. Our malloc definition is weak already, this will only change new/delete to match. This also makes the behaviour of static runtime consistent with the one of dynamic runtime where we can not prevent user from overloading operator new/delete. CHANGES SINCE LAST ACTION

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

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. Repository: rC Clang 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 created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. This has precedent in the StmtVisitor. This change will make it possible to clean up the comment handling in ASTDumper. Repository: rC Clang https://reviews.llvm.org/D55069

[PATCH] D55068: NFC: Simplify dumpStmt child handling

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. Repository: rC Clang https://reviews.llvm.org/D55068 Files: lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp

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

[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

[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

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=rev Log: [analyzer] Reference leaked object by name, even if it was created in an inlined function. rdar://45532181 Differential Revision:

[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 >

[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] 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

[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

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=rev Log: Revert r344580 "[analyzer] Nullability: Don't detect post factum violation..." Fails under ASan! Removed: cfe/trunk/test/Analysis/nullability-arc.mm

r347888 - [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__

2018-11-29 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Thu Nov 29 09:09:41 2018 New Revision: 347888 URL: http://llvm.org/viewvc/llvm-project?rev=347888=rev Log: [analyzer][PlistMacroExpansion] Part 4.: Support for __VA_ARGS__ Differential Revision: https://reviews.llvm.org/D52986 Modified:

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

2018-11-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54970/new/ https://reviews.llvm.org/D54970 ___ cfe-commits

[PATCH] D54905: [AddressSanitizer] Add flag to disable linking with CXX runtime

2018-11-29 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. Would turning asan operator new/delete into weak symbols help? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54905/new/ https://reviews.llvm.org/D54905 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2018-11-29 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:70 +- New :doc:`abseil-make-unique + ` check. Please use alphabetical order for new checks. Comment at: docs/clang-tidy/checks/abseil-make-unique.rst:6 + +Replaces

[PATCH] D55029: set default max-page-size to 4KB in lld for Android Aarch64

2018-11-29 Thread Zhizhou Yang via Phabricator via cfe-commits
zhizhouy added a comment. Thanks for the review and comments! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55029/new/ https://reviews.llvm.org/D55029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r347897 - set default max-page-size to 4KB in lld for Android Aarch64

2018-11-29 Thread Zhizhou Yang via cfe-commits
Author: zhizhouy Date: Thu Nov 29 10:52:22 2018 New Revision: 347897 URL: http://llvm.org/viewvc/llvm-project?rev=347897=rev Log: set default max-page-size to 4KB in lld for Android Aarch64 Summary: This patch passes an option '-z max-page-size=4096' to lld through clang driver. This is for

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

2018-11-29 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In D54757#1311516 , @Szelethus wrote: > In D54757#1311468 , @donat.nagy > wrote: > > > **Macros:** > > > > The current implementation of the check only looks at the preprocessed > >

[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();

[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

[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] 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

[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

[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

[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] 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

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=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] 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: Dont detect post factum violation on concrete values. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION

[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

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=rev Log: [analyzer] MallocChecker: Avoid redundant transitions. Don't generate a checker-tagged node unconditionally on the first checkDeadSymbols callback when no pointers

[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=176030#toc Repository: rC

[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

[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

[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

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=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

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=rev Log: [analyzer] [NFC] Some miscellaneous clean ups and documentation fixes. Differential Revision: https://reviews.llvm.org/D54971 Modified:

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=rev Log: [analyzer] Fixes after rebase. Modified: cfe/trunk/test/Analysis/osobject-retain-release.cpp

[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:

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=rev Log: [attributes] Add a family of OS_CONSUMED, OS_RETURNS and OS_RETURNS_RETAINED attributes The addition adds three attributes for communicating ownership,

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=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] 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:

[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:

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=rev Log: [analyzer] [NFC] Test dumping trimmed graph Differential Revision: https://reviews.llvm.org/D54972 Modified: cfe/trunk/test/Analysis/dump_egraph.c

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=rev Log: [analyzer] RetainCountChecker: recognize that OSObject can be created directly using an operator "new" Differential Revision: https://reviews.llvm.org/D55076

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=rev Log: [analyzer] RetainCountChecker for OSObject model the "free" call The "free" call frees the object immediately, ignoring the reference count. Sadly, it is

[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 ) const; + leonardchan wrote: > rjmccall wrote: > > Actually representing the fully-precise value is

[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/

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=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 state

[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

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=rev Log: [analyzer] [NFC] Minor refactoring of RetainCountDiagnostics Move visitors to the implementation file, move a complicated logic into a function. Differential

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=rev Log: [analyzer] Switch retain count checker for OSObject to use OS_* attributes Instead of generalized reference counting annotations. Differential Revision:

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=rev Log: [analyzer] For OSObject, trust that functions starting with Get (uppercase) are also getters. Differential Revision: https://reviews.llvm.org/D55035

[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

[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

[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 ___

  1   2   3   >