[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF planned changes to this revision. EricWF marked 7 inline comments as done. EricWF added inline comments. Comment at: include/clang/ASTMatchers/ASTMatchers.h:5262-5266 +AST_MATCHER(Type, unaryTransformType) { + if (const auto *T = Node.getAs()) +return T->getNumArgs()

[PATCH] D46286: [Driver] Don't warn about unused inputs in config files

2018-05-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. With additional changes the fix is OK. LGTM. https://reviews.llvm.org/D46286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added inline comments. Comment at: lib/AST/DeclPrinter.cpp:180-181 if (isFirst) { - if(TD) -SubPolicy.IncludeTagDefinition = true; + if (TD) +SubPolicy.TagSpecifierAs = TD; SubPolicy.SuppressSpecifiers = false; rsmith

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-03 Thread Yan Zhang via Phabricator via cfe-commits
Wizard marked 3 inline comments as done. Wizard added inline comments. Comment at: test/clang-tidy/objc-property-declaration.m:24 @property(assign, nonatomic) int enableGLAcceleration; +@property(assign, nonatomic) int ID; @end benhamilton wrote: > Please add

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-03 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 145145. Wizard added a comment. resolve comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46374 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp test/clang-tidy/objc-property-declaration-custom.m

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclPrinter.cpp:180-181 if (isFirst) { - if(TD) -SubPolicy.IncludeTagDefinition = true; + if (TD) +SubPolicy.TagSpecifierAs = TD; SubPolicy.SuppressSpecifiers = false; rsmith

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/AST/DeclPrinter.cpp:180-181 if (isFirst) { - if(TD) -SubPolicy.IncludeTagDefinition = true; + if (TD) +SubPolicy.TagSpecifierAs = TD; SubPolicy.SuppressSpecifiers = false;

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/AST/DeclPrinter.cpp:180-181 if (isFirst) { - if(TD) -SubPolicy.IncludeTagDefinition = true; + if (TD) +SubPolicy.TagSpecifierAs = TD; SubPolicy.SuppressSpecifiers = false;

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In https://reviews.llvm.org/D45463#1087174, @rsmith wrote: > > TagSpecifierAs expands sizeof(PrintingPolicy) from 8 to 16 bytes. My > > concern is the comments on PrintingPolicy about how PrintingPolicy is > > intended to be small. My guess it that 16 bytes is still

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-05-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObjectChecker.cpp:258-260 +Report->addNote(NoteBuf, +PathDiagnosticLocation::create(FieldChain.getEndOfChain(), +

Re: [libcxxabi] r331150 - Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-05-03 Thread Maxim Kuvyrkov via cfe-commits
Yes, it did. Thanks! -- Maxim Kuvyrkov www.linaro.org > On May 3, 2018, at 3:48 PM, Nico Weber wrote: > > r331450 should hopefully fix this. > > On Tue, May 1, 2018 at 8:55 AM, Nico Weber wrote: > tzik, can you take a look what's up on those bots?

[PATCH] D46415: [analyzer] pr36458: Fix retrieved value cast for symbolic void pointers.

2018-05-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, baloghadamsoftware. Through C cast magic it's possible to put a raw void pointer into a variable of non-void pointer type. It is fine -

[PATCH] D46410: [Target] Diagnose mismatch in required CPU for always_inline functions

2018-05-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. From the backend codegen perspective it would be fine if the callees instruction features were a subset. So it really depends on why the user wrote the different arch on the callee in the first place. If they did it because of one of the various tuning flags in

r331496 - [analyzer] NFC: Remove unused parameteer of StoreManager::CastRetrievedVal().

2018-05-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu May 3 17:53:41 2018 New Revision: 331496 URL: http://llvm.org/viewvc/llvm-project?rev=331496=rev Log: [analyzer] NFC: Remove unused parameteer of StoreManager::CastRetrievedVal(). Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h

[PATCH] D46410: [Target] Diagnose mismatch in required CPU for always_inline functions

2018-05-03 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. I like the idea of a front end warning, but had believed that a subset of cpu features should be allowed to be inlined into something that's a superset and it sounds like you don't agree? Your thoughts here? -eric https://reviews.llvm.org/D46410

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-05-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 145121. shuaiwang marked 4 inline comments as done. shuaiwang added a comment. Addressed review comments, notably added check for DeclRefExpr to volatile variables. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files:

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-05-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added inline comments. Comment at: clang-tidy/utils/ExprMutationAnalyzer.cpp:82-83 +const auto *E = RefNodes.getNodeAs("expr"); +if (findMutation(E)) + return E; + } aaron.ballman wrote: > Why does this not return the result of

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1413 + } else if (!Init->isEvaluatable(CE.CGM.getContext())) { +return false; + } else if (InitTy->hasPointerRepresentation()) { sepavloff wrote: > rjmccall wrote: > > Aren't the

[PATCH] D45860: [Coroutines] Catch exceptions in await_resume

2018-05-03 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov accepted this revision. GorNishanov added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D45860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. > TagSpecifierAs expands sizeof(PrintingPolicy) from 8 to 16 bytes. My concern > is the comments on PrintingPolicy about how PrintingPolicy is intended to be > small. My guess it that 16 bytes is still small enough, but perhaps Richard > Smith, who wrote that comment,

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Given that these are overloaded builtins, why are there separate builtins for `min` and `umin`? If this is a Clang extension, it needs to be documented in our extensions documentation. The documentation should describe the exact ordering semantics, to the extent we

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-05-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/TypeLoc.h:1992-1993 + unsigned getExtraLocalDataAlignment() const { +static_assert(alignof(TransformTraitTypeLoc) >= alignof(TypeSourceInfo *), + "not enough alignment for tail-allocated data"); +

[PATCH] D46410: [Target] Diagnose mismatch in required CPU for always_inline functions

2018-05-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: echristo, erichkeane. If an always inline function requests a different CPU than its caller we should probably error. If the callee CPU has features that the caller CPU doesn't we would already error for the feature mismatch,

[PATCH] D45470: Emit an error when mixing and

2018-05-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In https://reviews.llvm.org/D45470#1087026, @jfb wrote: > This isn't bad, so I'd go with it, but separately I imagine that we could > implement the suggestion in http://wg21.link/p0943 and expose it even before > C++20? Not sure we do this much, but I'd argue that

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Thanks for the quick review. Repository: rL LLVM https://reviews.llvm.org/D46363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46363: Follow-up to r331378. Update tests to allow to use C atomics in C++.

2018-05-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331484: Follow-up to r331378. Update tests to allow to use C atomics in C++. (authored by vsapsai, committed by ). Herald added subscribers: llvm-commits, delcypher. Changed prior to commit:

[PATCH] D46286: [Driver] Don't warn about unused inputs in config files

2018-05-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. @sepavloff - does the additional change to this one also look fine to you? https://reviews.llvm.org/D46286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:1002 + return EmitFinalDestCopy( + E->getType(), CGF.MakeNaturalAlignAddrLValue(Select, E->getType())); +} EricWF wrote: > rjmccall wrote: > > Is there something in Sema actually

[PATCH] D45470: Emit an error when mixing and

2018-05-03 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. This isn't bad, so I'd go with it, but separately I imagine that we could implement the suggestion in http://wg21.link/p0943 and expose it even before C++20? Not sure we do this much, but I'd argue that before that fix stdatomic.h is just useless anyways, so it's a fine

[PATCH] D45131: [AST] Refactor UnaryTransformType into TransformTraitType supporting non-unary transforms

2018-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 12 inline comments as done. EricWF added a comment. Ping. https://reviews.llvm.org/D45131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45463: [AST] Print correct tag decl for tag specifier

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 145092. jdenny removed a reviewer: jbcoe. jdenny added a comment. Rebased. Ping. https://reviews.llvm.org/D45463 Files: include/clang-c/Index.h include/clang/AST/PrettyPrinter.h lib/AST/DeclPrinter.cpp lib/AST/TypePrinter.cpp

r331483 - [X86] Make __builtin_ia32_directstore_u32 and __builtin_ia32_movdir64b 'nothrow'

2018-05-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu May 3 14:01:35 2018 New Revision: 331483 URL: http://llvm.org/viewvc/llvm-project?rev=331483=rev Log: [X86] Make __builtin_ia32_directstore_u32 and __builtin_ia32_movdir64b 'nothrow' These builtins snuck in while I was in the middle of adding nothrow to the other

r331482 - [CodeGenFunction] Use the StringRef::split function that takes a char separator instead of StringRef separator. NFC

2018-05-03 Thread Craig Topper via cfe-commits
Author: ctopper Date: Thu May 3 14:01:33 2018 New Revision: 331482 URL: http://llvm.org/viewvc/llvm-project?rev=331482=rev Log: [CodeGenFunction] Use the StringRef::split function that takes a char separator instead of StringRef separator. NFC The char separator version should be a little

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-05-03 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/CodeGen/CGExprAgg.cpp:1002 + return EmitFinalDestCopy( + E->getType(), CGF.MakeNaturalAlignAddrLValue(Select, E->getType())); +} rjmccall wrote: > Is there something in Sema actually validating that the

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45931#1086665, @alexfh wrote: > In https://reviews.llvm.org/D45931#1084503, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D45931#1083192, @lebedev.ri wrote: > > > > > Thank you for looking at this. > > > > > > In

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-03 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222 + [MatchedDecl](std::string const ) { +return s == MatchedDecl->getName(); + })) { benhamilton wrote: > `s` is a

[PATCH] D46406: [docs] Fix typos in the Clang User's Manual.

2018-05-03 Thread Joel Galenson via Phabricator via cfe-commits
jgalenson created this revision. jgalenson added reviewers: hans, sylvestre.ledru. Repository: rC Clang https://reviews.llvm.org/D46406 Files: docs/UsersManual.rst Index: docs/UsersManual.rst === --- docs/UsersManual.rst +++

[PATCH] D45093: [AST] Fix -ast-print for _Bool when have diagnostics

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 145078. jdenny edited the summary of this revision. jdenny added a comment. Rebased. Added example to summary. Ping. https://reviews.llvm.org/D45093 Files: include/clang/AST/ASTContext.h include/clang/Sema/Sema.h lib/Parse/ParseDecl.cpp

[PATCH] D45835: Add new driver mode for dumping compiler options

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 145077. aaron.ballman added a comment. Updated to remove the contentious parts, though I still hope to add those back in. https://reviews.llvm.org/D45835 Files: include/clang/Basic/Features.def include/clang/Driver/CC1Options.td

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D46403#1086923, @cmtice wrote: > Ok, I'll work on making this CFI-specific and adding a test case. Sounds good, thanks! I'd suggest modifying test/Driver/fsanitize-blacklist.c for your purposes. It should be possible to pair an empty resource

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Caroline Tice via Phabricator via cfe-commits
cmtice added a comment. Ok, I'll work on making this CFI-specific and adding a test case. https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-03 Thread Elena Demikhovsky via Phabricator via cfe-commits
delena added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3098 + case AtomicExpr::AO__atomic_fetch_umax: +IsMinMax = true; +Form = Arithmetic; jfb wrote: > Should `__sync_fetch_and_min` and others also set `IsMinMax`? __sync_fetch_and_min is

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Caroline Tice via Phabricator via cfe-commits
cmtice updated this revision to Diff 145073. cmtice added a comment. Tried to upload the diff from the correct location. https://reviews.llvm.org/D46403 Files: lib/Driver/SanitizerArgs.cpp Index: lib/Driver/SanitizerArgs.cpp

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks! https://reviews.llvm.org/D46049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Vedant Kumar via Phabricator via cfe-commits
vsk requested changes to this revision. vsk added a comment. This revision now requires changes to proceed. Toolchain vendors aren't currently required to provide default blacklists for every sanitizer clang supports. We don't ship a default ubsan blacklist on macOS, so this patch would break

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 145072. pfultz2 added a comment. Rename flag to `AllowEnablingAnalyzerAlphaCheckers`. https://reviews.llvm.org/D46159 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidyOptions.cpp clang-tidy/ClangTidyOptions.h clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added inline comments. Comment at: clang-tidy/ClangTidyOptions.h:80-82 + /// \brief Turns on experimental alpha checkers from the static analyzer. + llvm::Optional AllowEnablingAlphaChecks; + alexfh wrote: > Since this will only be configurable via a

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Test? Repository: rC Clang https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46050: [Frontend] Avoid running plugins during code completion parse

2018-05-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: test/Frontend/plugins.c:7 + +// RUN: c-index-test -code-completion-at=%s:6:1 -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-fns %s | FileCheck -check-prefix=CHECK-COMPLETION-WITHOUT-PLUGINS %s +// REQUIRES:

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Also, please upload the correct patch, from the root of the repo, not from the directory of the file. Repository: rC Clang https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46393: Remove explicit cfg-temporary-dtors=true

2018-05-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks! Just curious - did these flags bother you? Cause we never really care about cleaning up run lines after flipping the flag, so we have a lot of such stale flags in our tests. We could start

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Caroline Tice via Phabricator via cfe-commits
cmtice created this revision. cmtice added a reviewer: pcc. Herald added a subscriber: cfe-commits. Currently LLVM CFI tries to use an implicit blacklist file, currently in /usr/lib64/clang//share. If the file is not there, LLVM happily continues, which causes CFI to add checks to

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think we should seriously consider making alignment attributes on typedefs (and maybe some other attributes like may_alias) actual type qualifiers that are preserved in the canonical type, mangled, and so on. It would be an ABI break, but it'd also solve a lot of

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-03 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3098 + case AtomicExpr::AO__atomic_fetch_umax: +IsMinMax = true; +Form = Arithmetic; Should `__sync_fetch_and_min` and others also set `IsMinMax`? Repository: rC Clang

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. > Note that this sort of attribute is stripped from template arguments in > template substitution, so there's a possibility that code templated over > vectors will produce inadequately-aligned objects. I was wondering whether there is a warning clang issues when the

[clang-tools-extra] r331475 - Simplify test clang-tidy-__clang_analyzer__macro.cpp

2018-05-03 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Thu May 3 11:31:39 2018 New Revision: 331475 URL: http://llvm.org/viewvc/llvm-project?rev=331475=rev Log: Simplify test clang-tidy-__clang_analyzer__macro.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/clang-tidy-__clang_analyzer__macro.cpp Modified:

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331474: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility… (authored by zinovy.nis, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[clang-tools-extra] r331474 - [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-05-03 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Thu May 3 11:26:39 2018 New Revision: 331474 URL: http://llvm.org/viewvc/llvm-project?rev=331474=rev Log: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer This macro is widely used in many well-known projects, ex.

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45702#1086250, @aaron.ballman wrote: > In https://reviews.llvm.org/D45702#1085890, @shuaiwang wrote: > > > In https://reviews.llvm.org/D45702#1085224, @aaron.ballman wrote: > > > > > > Have you run this over any large code bases to see

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Thanks Alexander for your feedback! https://reviews.llvm.org/D46325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! https://reviews.llvm.org/D46325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 145059. zinovy.nis added a comment. - Added comments on why setting `ProgramAction` explicitly. https://reviews.llvm.org/D46325 Files: clang-tidy/ClangTidy.cpp test/clang-tidy/clang-tidy-__clang_analyzer__macro.cpp Index:

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45931#1086665, @alexfh wrote: > In https://reviews.llvm.org/D45931#1084503, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D45931#1083192, @lebedev.ri wrote: > > > > > Thank you for looking at this. > > > > > > In

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. a.sidorin added reviewers: xazax.hun, martong, szepet, jingham. Herald added subscribers: cfe-commits, rnkovacs. `buildASTFromCodeWithArgs()` accepts `llvm::Twine` as `Code` argument. However, if the argument is not a C string or std::string, the argument is

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1403 + if (auto *IL = dyn_cast_or_null(Init)) { +if (InitTy->isConstantArrayType()) { + for (auto I : IL->inits()) rjmccall wrote: >

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added a comment. I'll have a look at these issues tomorrow and submit a new patch then. Thanks for all your help so far! https://reviews.llvm.org/D46394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D46159#1086627, @alexfh wrote: > In https://reviews.llvm.org/D46159#1086493, @aaron.ballman wrote: > > > I think the premise is a bit off the mark. It's not that these are not for > > the common user -- it's that they're simply not

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 145049. sepavloff marked an inline comment as done. sepavloff added a comment. Small simplification Repository: rC Clang https://reviews.llvm.org/D46241 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/cxx11-initializer-aggregate.cpp Index:

[PATCH] D46370: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331469: [OPENMP] Fix test typos: CHECK-DAG-N - CHECK-N-DAG (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D46370?vs=144949=145047#toc Repository: rC Clang

r331468 - Revert r331466: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG"

2018-05-03 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Thu May 3 10:22:01 2018 New Revision: 331468 URL: http://llvm.org/viewvc/llvm-project?rev=331468=rev Log: Revert r331466: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG" Sorry, forgot to add commit log attributes. Modified:

r331469 - [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Thu May 3 10:22:04 2018 New Revision: 331469 URL: http://llvm.org/viewvc/llvm-project?rev=331469=rev Log: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG Reviewed by: ABataev Differential Revision: https://reviews.llvm.org/D46370 Modified:

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane requested changes to this revision. erichkeane added a comment. This revision now requires changes to proceed. When building this, it didn't build since you'd reused the name. I changed the variable to be named "Dest" instead of "Destination" That said, the test suite now fails on

r331466 - [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Thu May 3 10:15:44 2018 New Revision: 331466 URL: http://llvm.org/viewvc/llvm-project?rev=331466=rev Log: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG Modified: cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-05-03 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. In https://reviews.llvm.org/D46013#1084440, @efriedma wrote: > I'd like to see some tests for __attribute((packed)). Thanks, indeed it does not work correctly on packed structures. Back to the drawing board ... Repository: rC Clang https://reviews.llvm.org/D46013

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D45931#1084503, @lebedev.ri wrote: > In https://reviews.llvm.org/D45931#1083192, @lebedev.ri wrote: > > > Thank you for looking at this. > > > > In https://reviews.llvm.org/D45931#1083184, @alexfh wrote: > > > > > From a user's perspective I'd

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. What's the use case for debug CSA checkers in clang-tidy? Repository: rC Clang https://reviews.llvm.org/D46187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D46159#1086493, @aaron.ballman wrote: > I think the premise is a bit off the mark. It's not that these are not for > the common user -- it's that they're

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:195 +/// This option Enables alpha checkers from the static analyzer, that are +/// experimental. This option is set to false and not visible in help, because lebedev.ri wrote: >

[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. I see,t hank you. Please feel free to submit a patch - it seems like you already have a nice test case that shows the difference between two import options. https://reviews.llvm.org/D26054 ___ cfe-commits mailing list

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:195 +/// This option Enables alpha checkers from the static analyzer, that are +/// experimental. This option is set to false and not visible in help, because xbolva00 wrote: >

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > When something is merged into Clang trunk, the expectation is that it will be > production quality or will be worked on rapidly to get it to production > quality, which is somewhat orthogonal to getting user feedback. I don't know > that I have the full history of

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added a comment. @erichkeane That would be great! Thanks! https://reviews.llvm.org/D46394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. This looks fine to me. Let me know if you need me to commit this for you. https://reviews.llvm.org/D46394 ___ cfe-commits mailing list

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb updated this revision to Diff 145030. fxb added a comment. Updated the code to use an enum called `ShowIncludesDestination` https://reviews.llvm.org/D46394 Files: include/clang/Frontend/DependencyOutputOptions.h lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInstance.cpp

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D46159#1086553, @pfultz2 wrote: > > I think the premise is a bit off the mark. It's not that these are not for > > the common user -- it's that they're simply not ready for users at all. > > Then why was it merged into clang in the

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. It looks like you've missed some comments or uploaded a wrong patch. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:105 +const TypeVec

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 145029. pfultz2 added a comment. Rename flag to `allow-enabling-alpha-checks` and removed the option from the clang-tidy file. https://reviews.llvm.org/D46159 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidyOptions.cpp

[PATCH] D33844: [clang-tidy] terminating continue check

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. There are still outstanding comments. https://reviews.llvm.org/D33844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-03 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. In https://reviews.llvm.org/D36610#1083952, @mikhail.ramalho wrote: > Ping. Given that richard smith is the only non-approver, and that he hasn't responded, and that I contributed this code, I'm going to make an executive decision and say that this is OK to

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/bugprone/InfiniteLoopCheck.h:37 +private: + bool updateSequence(Stmt *FunctionBody, ASTContext ); + const Stmt *PrevFunctionBody;

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-05-03 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Maybe this is a user error of CrossTU, but it seemed to import a FuncDecl with attributes, causing the imported FuncDecl to have all those attributes twice. That's why I thought merging would maybe make sense. However I did not encounter any issue with the duplicate

[clang-tools-extra] r331461 - Added trailing periods.

2018-05-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu May 3 09:01:49 2018 New Revision: 331461 URL: http://llvm.org/viewvc/llvm-project?rev=331461=rev Log: Added trailing periods. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL:

[clang-tools-extra] r331460 - Add a trailing period in release notes.

2018-05-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu May 3 08:59:39 2018 New Revision: 331460 URL: http://llvm.org/viewvc/llvm-project?rev=331460=rev Log: Add a trailing period in release notes. Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In https://reviews.llvm.org/D46159#1086553, @pfultz2 wrote: > > I think the premise is a bit off the mark. It's not that these are not for > > the common user -- it's that they're simply not ready for users at all. > > Then why was it merged into clang in the first

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > I think the premise is a bit off the mark. It's not that these are not for > the common user -- it's that they're simply not ready for users at all. Then why was it merged into clang in the first place? It seems like the whole point of merging it into clang is to get

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/ClangTidy.cpp:536 + DiagnosticConsumer *DiagConsumer) override { +

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83 +long int li = static_cast(foo()); +// CHECK-FIXES-0-0: auto li = {{.*}} +

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added inline comments. Comment at: include/clang/Frontend/DependencyOutputOptions.h:31 unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list unsigned PrintShowIncludes : 1; ///< Print cl.exe style /showIncludes info. + unsigned

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Frontend/DependencyOutputOptions.h:31 unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list unsigned PrintShowIncludes : 1; ///< Print cl.exe style /showIncludes info. + unsigned

[PATCH] D43750: Allow writing calling convention attributes on function types

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D43750#1085780, @rsmith wrote: > I'm really sad about this; C++11 attributes were supposed to fix the > undisciplined "do what I mean" behavior of GNU attributes. But you're right, > these really are

  1   2   >