[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D68115#1686887 , @vitalybuka wrote: > I would be happy to update the patch to enable it only for > -ftrivial-auto-var-init=pattern, if we want "bumper" version. It seems to be a separable feature (although it

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. > The patch as-is moves past the scope of the `-ftrivial-auto-var-init` feature. That's because I had misunderstanding of the standard. I would be happy to update the patch to enable it only for -ftrivial-auto-var-init=pattern, if we want "bumper" version. For

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D68115#1686837 , @jfb wrote: > The entire point of this feature is to add guardrails to the language. What > do people expect in the real world? Is there a cost to meeting these > expectations? If we put the pattern (0x00

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D68115#1686837 , @jfb wrote: > The entire point of this feature is to add guardrails to the language. I agree, and guardrails have a tendency to scratch paint if one drives against them. > What do people

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. The entire point of this feature is to add guardrails to the language. What do people expect in the real world? Is there a cost to meeting these expectations? If we put the pattern (0x00 or 0xaa) in the technically undef space, what comes out? Repository: rG LLVM

[PATCH] D68163: [analyzer][MallocChecker][NFC] Change the use of IdentifierInfo* to CallDescription

2019-09-27 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. Fantastic, thanks!! Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:259 /// calls. bool isCalled(const CallDescription ) const;

[PATCH] D68162: [analyzer][MallocChecker][NFC] Communicate the allocation family information to auxiliary functions with template parameters

2019-09-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thank you, fantastic finding! > in fact we know it //compile time// Yeah, but is it accidental or is there a good reason behind always having this information at compile time? 'Cause i don't want to restrict the code to always provide this information at compile time if

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-09-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:378-379 + + using CheckFn = void (MallocChecker::*)(CheckerContext , const CallExpr *CE, + ProgramStateRef

[PATCH] D68172: Don't install example analyzer plugins

2019-09-27 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D68172#1686772 , @NoQ wrote: > +@Szelethus because i'm a bit out-of-the-loop on plugins: i very vaguely > remember that we decided to put them into tests(?) The plugins were in `test`, but D62445

[PATCH] D68172: Don't install example analyzer plugins

2019-09-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a reviewer: Szelethus. NoQ added a comment. +@Szelethus because i'm a bit out-of-the-loop on plugins: i very vaguely remember that we decided to put them into tests(?) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68172/new/

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/init.c:197 // CHECK-LABEL: @nonzeroPaddedUnionMemset( - // CHECK-NOT: store - // CHECK-NOT: memcpy - // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16, i32 36, i1 false) + // CHECK:

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D67706#1685963 , @Szelethus wrote: > It seems like this patch is diffed against your latest commit, not the master > branch. Yeah, seems so. The code looks great tho, thanks! Comment at:

[PATCH] D68172: Don't install example analyzer plugins

2019-09-27 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: hintonda, NoQ. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware, mgorny. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68172

[PATCH] D66696: [ObjC generics] Fix not inheriting type bounds in categories/extensions.

2019-09-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Found a use case where `getCanonicalType()` causes problems: @interface NSObject @end @protocol SomeProtocol @end @interface NSString : NSObject @end @interface NSNumber : NSObject @end @interface Container @end @interface Container

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka marked 2 inline comments as done. vitalybuka added inline comments. Comment at: clang/test/CodeGen/init.c:197 // CHECK-LABEL: @nonzeroPaddedUnionMemset( - // CHECK-NOT: store - // CHECK-NOT: memcpy - // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16,

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/init.c:197 // CHECK-LABEL: @nonzeroPaddedUnionMemset( - // CHECK-NOT: store - // CHECK-NOT: memcpy - // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16, i32 36, i1 false) + // CHECK:

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka marked an inline comment as done. vitalybuka added inline comments. Comment at: clang/test/CodeGen/init.c:197 // CHECK-LABEL: @nonzeroPaddedUnionMemset( - // CHECK-NOT: store - // CHECK-NOT: memcpy - // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16,

[PATCH] D68115: Zero initialize padding in unions

2019-09-27 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka marked an inline comment as done. vitalybuka added inline comments. Comment at: clang/test/CodeGen/init.c:197 // CHECK-LABEL: @nonzeroPaddedUnionMemset( - // CHECK-NOT: store - // CHECK-NOT: memcpy - // CHECK: call void @llvm.memset.p0i8.i32(i8* {{.*}}, i8 -16,

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-27 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. lgtm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67592/new/ https://reviews.llvm.org/D67592 ___ cfe-commits mailing list

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-09-27 Thread Sergey Dmitriev via Phabricator via cfe-commits
sdmitriev added a comment. The second part was uploaded to https://reviews.llvm.org/D68166. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64943/new/ https://reviews.llvm.org/D64943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D68161: [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

2019-09-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri accepted this revision. lebedev.ri added a reviewer: thakis. lebedev.ri added a comment. This revision is now accepted and ready to land. Oh nice! F10096481: image.png F10096488: image.png I like this. One more

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-09-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:890 -bool MemFunctionInfoTy::isCMemAllocFunction(const CallEvent ) const { - if (Call.isCalled(CD_malloc, CD_realloc, CD_reallocf,

[PATCH] D68165: [analyzer][MallocChecker][NFC] Split checkPostCall up, deploy CallDescriptionMap

2019-09-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, Charusso, baloghadamsoftware, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Szelethus added a

[PATCH] D68163: [analyzer][MallocChecker][NFC] Change the use of IdentifierInfo* to CallDescription

2019-09-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, baloghadamsoftware, Charusso, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. Exactly what it

[PATCH] D68162: [analyzer][MallocChecker][NFC] Communicate the allocation family information to auxiliary functions with template parameters

2019-09-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, rnkovacs, Charusso, dcoughlin, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, whisperity. The following

[PATCH] D68148: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

2019-09-27 Thread Michael Wyman via Phabricator via cfe-commits
mwyman updated this revision to Diff 53. mwyman added a comment. Moved release note below list of new checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68148/new/ https://reviews.llvm.org/D68148 Files: clang-tools-extra/clang-tidy/darwin/AvoidSpinlockCheck.cpp

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-27 Thread Joel Klinghed via Phabricator via cfe-commits
the_jk updated this revision to Diff 51. the_jk added a comment. Moved ModuleName change to CodeGeneratorImpl as suggested, agree that it seems to fit well there. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67592/new/ https://reviews.llvm.org/D67592 Files:

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-09-27 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked an inline comment as done. anton-afanasyev added inline comments. Comment at: cfe/trunk/lib/CodeGen/BackendUtil.cpp:1426-1431 EmitAssemblyHelper AsmHelper(Diags, HeaderOpts, CGOpts, TOpts, LOpts, M); if (CGOpts.ExperimentalNewPassManager)

[PATCH] D68161: [TimeProfiler] Fix "OptModule" section and add new "Backend" sections

2019-09-27 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev created this revision. anton-afanasyev added a reviewer: lebedev.ri. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, mehdi_amini. Herald added projects: clang, LLVM. Remove unnecessary "OptModule" section. Add "PerFunctionPasses", "PerModulePasses" and

[PATCH] D68148: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

2019-09-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:70 +- The 'objc-avoid-spinlock' check was renamed to :doc:`darwin-avoid-spinlock + ` Please place this after list of new checks. If there are other renamed checks,

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-09-27 Thread Douglas Yung via Phabricator via cfe-commits
dyung accepted this revision. dyung added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66176/new/ https://reviews.llvm.org/D66176 ___

[PATCH] D67592: [Clang] Use -main-file-name for source filename if not set

2019-09-27 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Please upload patches with context (https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface) I'm not terribly familiar with this part of clang, but my concern would be that overriding the PresumedInputFile here could have unintended side

[PATCH] D67122: [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour

2019-09-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 45. lebedev.ri marked 6 inline comments as done. lebedev.ri added a comment. Patch updated - mainly wording changes only. It isn't clear that for C the rule is actually different from C++, if it is it does not make much sense and is irrelevant for

[PATCH] D66834: Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

2019-09-27 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb added a comment. Can someone please commit this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66834/new/ https://reviews.llvm.org/D66834 ___ cfe-commits mailing list

r373122 - For P0784R7: add support for explicit destructor calls and

2019-09-27 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Sep 27 13:24:36 2019 New Revision: 373122 URL: http://llvm.org/viewvc/llvm-project?rev=373122=rev Log: For P0784R7: add support for explicit destructor calls and pseudo-destructor calls in constant evaluation. Modified:

[PATCH] D68157: [X86][ABI] Keep empty class argument passing by value compatible with GCC.

2019-09-27 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: craig.topper. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68157 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/empty-class.cpp Index:

[PATCH] D68155: [clang][NFC] Make various uses of Regex const

2019-09-27 Thread Nicolas Guillemot via Phabricator via cfe-commits
nlguillemot created this revision. nlguillemot added a reviewer: thopre. Herald added a project: clang. Herald added a subscriber: cfe-commits. The const-correctness of match() was fixed in rL372764 , which allows uses of Regex objects to be const in cases they

[PATCH] D63640: [clang] Improve Serialization/Imporing/Dumping of APValues

2019-09-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/Expr.cpp:319 case RSK_None: return; case RSK_Int64: Can you use `llvm_unreachable` here? (Are there cases where we use `RSK_None` and then later find we actually have a value to store into the

[PATCH] D64319: [OpenCL] Add function attributes handling for builtin functions

2019-09-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64319/new/ https://reviews.llvm.org/D64319 ___ cfe-commits mailing

[PATCH] D68143: [clang] Make handling of unnamed template params similar to function params

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/AST/DeclTemplate.cpp:513 getDefaultArgumentInfo()->getTypeLoc().getEndLoc()); - else -return TypeDecl::getSourceRange(); + else if(getName().empty()) +return SourceRange(getBeginLoc());

[PATCH] D68148: [clang-tidy] Rename objc-avoid-spinlock check to darwin-avoid-spinlock

2019-09-27 Thread Michael Wyman via Phabricator via cfe-commits
mwyman created this revision. mwyman added reviewers: stephanemoore, dmaclach. mwyman added projects: clang-tools-extra, clang, LLVM. Herald added subscribers: cfe-commits, xazax.hun, mgorny. mwyman edited the summary of this revision. OSSpinLock* are Apple/Darwin functions, but were previously

[PATCH] D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions.

2019-09-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. This needs a lot more test coverage: The frontend cases aren't all covered by frontend checks and neither is the dwarf output. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68117/new/ https://reviews.llvm.org/D68117

[PATCH] D68117: [DWARF-5] Support for C++11 defaulted, deleted member functions.

2019-09-27 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added a comment. Thanks, this looks like a good addition! Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1608 + if (CGM.getCodeGenOpts().DwarfVersion >= 5) { +// DWARF-5 support for, defaulted, deleted member functions Please try to always upload

[PATCH] D68124: [clangd] Fix template type aliases in findExplicitReference

2019-09-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373104: [clangd] Fix template type aliases in findExplicitReference (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r373104 - [clangd] Fix template type aliases in findExplicitReference

2019-09-27 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Sep 27 10:55:46 2019 New Revision: 373104 URL: http://llvm.org/viewvc/llvm-project?rev=373104=rev Log: [clangd] Fix template type aliases in findExplicitReference Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, usaxena95,

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-09-27 Thread Tom Stellard via Phabricator via cfe-commits
tstellar marked an inline comment as done. tstellar added inline comments. Comment at: clang/test/Driver/modules.cpp:19 +// CHECK-COMPILE-SAME: {{ -o }} +// CHECK-COMPILE-SAME: module{{2*}}.{{pcm.o|s}} // CHECK-COMPILE-SAME: -x pcm dyung wrote: > I'm not sure

[PATCH] D68147: [MC][ELF] Prevent globals with an explicit section from being mergeable by default and add a safe option to allow mergeable

2019-09-27 Thread ben via Phabricator via cfe-commits
bd1976llvm created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Alternative to https://reviews.llvm.org/D68101 Prevents globals with an explicit section from being mergeable by default (as in D68101

[PATCH] D66176: Fix Driver/modules.cpp test to work when build directory name contains '.s'

2019-09-27 Thread Tom Stellard via Phabricator via cfe-commits
tstellar updated this revision to Diff 05. tstellar added a comment. Don't check .s suffix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66176/new/ https://reviews.llvm.org/D66176 Files: clang/test/Driver/modules.cpp Index:

[PATCH] D68124: [clangd] Fix template type aliases in findExplicitReference

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 04. ilya-biryukov added a comment. - Add a comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68124/new/ https://reviews.llvm.org/D68124 Files: clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D64319: [OpenCL] Add function attributes handling for builtin functions

2019-09-27 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 222197. svenvh edited the summary of this revision. svenvh added a comment. Herald added a reviewer: rengolin. - Rebase onto recent master. - Fix formatting. - Use predefined attribute sets like "Attr.Const" instead of bit lists. CHANGES SINCE LAST ACTION

[PATCH] D68028: [clang] Add no_builtin attribute

2019-09-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:1092 + // Wildcard is a super set of all builtins, we keep only this one. + if (FunctionNames.count(Wildcard) > 0) { +FunctionNames.clear();

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.h:270 + /// It will be “a::b” for both carrot locations. + std::string CurrentNamespace; + /// Offsets into the code marking eligible points to insert a

[PATCH] D67436: CodeGen: set correct result for atomic compound expressions

2019-09-27 Thread JF Bastien via Phabricator via cfe-commits
jfb accepted this revision. jfb added a comment. This revision is now accepted and ready to land. Herald added a subscriber: dexonsmith. Separately, does this do floating-point add / sub properly? We added them too C++20. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D68124: [clangd] Fix template type aliases in findExplicitReference

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang-tools-extra/clangd/FindTarget.cpp:478 + explicitReferenceTargets(DynTypedNode::create(L.getType()), +

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks for formatting test cases, I had it in mind but forgot to mention in last round. LGTM Comment at: clang-tools-extra/clangd/HeaderSourceSwitch.cpp:113 + auto

[PATCH] D68143: [clang] Make handling of unnamed template params similar to function params

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman. Herald added a project: clang. Clang uses the location identifier should be inserted for declarator decls when a decl is unnamed. But for type template and template template

[PATCH] D68142: [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

2019-09-27 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet created this revision. gchatelet added a reviewer: courbet. Herald added subscribers: llvm-commits, cfe-commits, asbirlea, hiraditya. Herald added a reviewer: jdoerfert. Herald added projects: clang, LLVM. This is patch is part of a series to introduce an Alignment type. See this thread

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222180. kadircet added a comment. - Add renaming of template and function parameters Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66647/new/ https://reviews.llvm.org/D66647 Files:

[PATCH] D66647: [clangd] DefineInline action apply logic with fully qualified names

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D66647#1684046 , @ilya-biryukov wrote: > We also need to rename parameters sometimes, right? > > // Sometimes we need to rename parameters. > void usages(int decl_param, int); > > void usages(int def_param, int

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373093: [libTooling] Transformer: refine `SourceLocation` specified as anchor of… (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

r373093 - [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via cfe-commits
Author: ymandel Date: Fri Sep 27 08:26:04 2019 New Revision: 373093 URL: http://llvm.org/viewvc/llvm-project?rev=373093=rev Log: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes. Summary: Every change triggered by a rewrite rule is anchored at a particular

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D66652#1654585 , @gribozavr wrote: > > So, I plan to rework this into two revisions: one to match > > https://reviews.llvm.org/D66676 (and keep the tests esssentially as they > > are) and one to add getRuleMatchLoc for future

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-27 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64StackTagging.cpp:461 void AArch64StackTagging::alignAndPadAlloca(AllocaInfo ) { - unsigned NewAlignment = std::max(Info.AI->getAlignment(), kTagGranuleSize); + MaybeAlign

[PATCH] D66652: [libTooling] Transformer: refine `SourceLocation` specified as anchor of changes.

2019-09-27 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 222177. ymandel added a comment. Herald added a subscriber: jfb. reworked to follow same scheme as clang-tidy version, per discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66652/new/

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2019-09-27 Thread Albert Astals Cid via Phabricator via cfe-commits
tsdgeos added a comment. Herald added a subscriber: wuzish. Herald added a project: clang. Would this warn with stuff like double borderWidth; [... code that doesn't use borderWidth ...] borderWidth = border->getWidth(); [... code that reads borderWidth ...] Repository: rCTE Clang

[PATCH] D68141: [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

2019-09-27 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet created this revision. gchatelet added a reviewer: courbet. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, eraman, nhaehnle, jvesely, arsenm, jholewinski. Herald added projects: clang, LLVM. This is patch is part of a series to introduce an Alignment type. See this

[PATCH] D66834: Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

2019-09-27 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. In D66834#1685921 , @broadwaylamb wrote: > In D66834#1685260 , @sepavloff wrote: > > > In

[PATCH] D63640: [clang] Improve Serialization/Imporing/Dumping of APValues

2019-09-27 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 222169. Tyker marked 3 inline comments as done. Tyker added a comment. made renamings CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63640/new/ https://reviews.llvm.org/D63640 Files: clang/include/clang/AST/APValue.h

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-27 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. It seems like this patch is diffed against your latest commit, not the master branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706

[PATCH] D68028: [clang] Add no_builtin attribute

2019-09-27 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D68028#1685912 , @gchatelet wrote: > @tejohnson I believe this is the missing part for D67923 > . Thanks, yep I will take a closer look at the patch today. > I'm unsure if we still need

[PATCH] D66834: Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`

2019-09-27 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb added a comment. In D66834#1685260 , @sepavloff wrote: > In D66834#1653334 , @broadwaylamb > wrote: > > > In D66834#1652756 , @compnerd > > wrote: > > > > > I

[PATCH] D68028: [clang] Add no_builtin attribute

2019-09-27 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 222163. gchatelet added a comment. - Update documentation and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68028/new/ https://reviews.llvm.org/D68028 Files: clang/include/clang/Basic/Attr.td

r373088 - [OpenCL] Pass LangOptions as const ref

2019-09-27 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Fri Sep 27 06:31:29 2019 New Revision: 373088 URL: http://llvm.org/viewvc/llvm-project?rev=373088=rev Log: [OpenCL] Pass LangOptions as const ref Modified: cfe/trunk/include/clang/Basic/OpenCLOptions.h Modified: cfe/trunk/include/clang/Basic/OpenCLOptions.h URL:

[PATCH] D68028: [clang] Add no_builtin attribute

2019-09-27 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. @tejohnson I believe this is the missing part for D67923 . I'm unsure if we still need the `BitVector` at all in the `TLI` since it could be a simple attribute lookup on the function. Do you see any problematic interactions with the

[PATCH] D67545: [clang-tidy] Added DefaultOperatorNewCheck.

2019-09-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 222161. balazske added a comment. - Rename to DefaultOperatorNewAlignmentCheck. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67545/new/ https://reviews.llvm.org/D67545 Files:

[PATCH] D65433: [clangd] DefineInline action availability checks

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 222158. kadircet added a comment. - Rebase and bail out on methods inside templated classes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65433/new/ https://reviews.llvm.org/D65433 Files:

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-09-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 3 inline comments as done. kadircet added inline comments. Comment at: clang-tools-extra/clangd/SourceCode.cpp:997 + // definitions as well. One might use a closing parantheses(")" followed by an + // opening brace "{" to trigger the start. +

[PATCH] D68137: [clangd] Handle template arguments in findExplicitReferences

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:576 +case TemplateArgument::Expression: + break; // Handled by visited functions. +}; This comment is a bit unclear, I'll have to change it. The idea is that

[PATCH] D68137: [clangd] Handle template arguments in findExplicitReferences

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman, jkorous, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68137 Files: clang-tools-extra/clangd/FindTarget.cpp

[PATCH] D68024: [clangd] Implement GetEligiblePoints

2019-09-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. The implementation looks good, just have some questions on the API. Comment at: clang-tools-extra/clangd/SourceCode.cpp:997 + // definitions as well. One might use a closing parantheses(")" followed by an + // opening brace "{" to trigger the start.

[PATCH] D68132: clang-tidy: Don't repeat list of all checks in three places.

2019-09-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373082: clang-tidy: Dont repeat list of all checks in three places. (authored by nico, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D68132: clang-tidy: Don't repeat list of all checks in three places.

2019-09-27 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! I'll land this, but beanz, if the cmake setup here is weird please shout and I'll try to make it less weird. We have a few other instances of PARENT_SCOPE variables, so maybe this is how cmake likes to do "group of libraries". CHANGES SINCE LAST ACTION

[clang-tools-extra] r373082 - clang-tidy: Don't repeat list of all checks in three places.

2019-09-27 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Sep 27 05:56:14 2019 New Revision: 373082 URL: http://llvm.org/viewvc/llvm-project?rev=373082=rev Log: clang-tidy: Don't repeat list of all checks in three places. Instead, put all checks in a cmake variable and reference this. Also, make clangd use the the

[PATCH] D68132: clang-tidy: Don't repeat list of all checks in three places.

2019-09-27 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added reviewers: beanz, mwyman, gribozavr. Herald added subscribers: usaxena95, kadircet, arphaman, jkorous, ilya-biryukov, mgorny, srhines. Herald added a reviewer: jdoerfert. Instead, put all checks in a cmake variable and reference this. Also, make clangd

[clang-tools-extra] r373079 - [clangd] Remove an unrelated comment, NFC.

2019-09-27 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Sep 27 05:32:19 2019 New Revision: 373079 URL: http://llvm.org/viewvc/llvm-project?rev=373079=rev Log: [clangd] Remove an unrelated comment, NFC. Modified: clang-tools-extra/trunk/clangd/SemanticHighlighting.cpp Modified:

[PATCH] D67414: [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode

2019-09-27 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373078: [clang] [AST] Treat inline gnu_inline the same way as extern inline… (authored by mstorsjo, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

r373078 - [clang] [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode

2019-09-27 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Fri Sep 27 05:25:19 2019 New Revision: 373078 URL: http://llvm.org/viewvc/llvm-project?rev=373078=rev Log: [clang] [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode This matches how GCC handles it, see e.g.

[PATCH] D67901: [clangd] Improve semantic highlighting in dependent contexts (fixes #154)

2019-09-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:181 + addToken(E->getMemberLoc(), E->getQualifier() + ? HighlightingKind::StaticField + :

[PATCH] D67706: [clang][analyzer] Using CallDescription in StreamChecker.

2019-09-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 222138. balazske added a comment. Using CallDescriptionMap. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67706/new/ https://reviews.llvm.org/D67706 Files:

[PATCH] D67567: [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage

2019-09-27 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D67567#1685077 , @mwyman wrote: > In D67567#1685036 , @gribozavr wrote: > > > Sorry, I reverted it in r373032 because the test fails on Linux: > >

[PATCH] D68120: [clangd] Handle type template parameters in findExplicitReferences

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 222126. ilya-biryukov added a comment. - Add tests for non-type template paremeters Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68120/new/ https://reviews.llvm.org/D68120 Files:

[PATCH] D68120: [clangd] Handle type template parameters in findExplicitReferences

2019-09-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373067: [clangd] Handle type template parameters in findExplicitReferences (authored by ibiryukov, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[clang-tools-extra] r373068 - Fixed indentation in a ClangTidy test

2019-09-27 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Fri Sep 27 03:58:10 2019 New Revision: 373068 URL: http://llvm.org/viewvc/llvm-project?rev=373068=rev Log: Fixed indentation in a ClangTidy test Modified: clang-tools-extra/trunk/test/clang-tidy/google-objc-global-variable-declaration.mm Modified:

[clang-tools-extra] r373067 - [clangd] Handle type template parameters in findExplicitReferences

2019-09-27 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Fri Sep 27 03:55:53 2019 New Revision: 373067 URL: http://llvm.org/viewvc/llvm-project?rev=373067=rev Log: [clangd] Handle type template parameters in findExplicitReferences Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, usaxena95,

[clang-tools-extra] r373066 - Moved -fblocks from an individual test to check_clang_tidy.py

2019-09-27 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Fri Sep 27 03:54:28 2019 New Revision: 373066 URL: http://llvm.org/viewvc/llvm-project?rev=373066=rev Log: Moved -fblocks from an individual test to check_clang_tidy.py This way, all tests will benefit from it and will not have to worry about setting up language options

[clang-tools-extra] r373065 - [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage.

2019-09-27 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Fri Sep 27 03:49:12 2019 New Revision: 373065 URL: http://llvm.org/viewvc/llvm-project?rev=373065=rev Log: [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage. Summary: Creates a new darwin ClangTidy module and adds the

[PATCH] D68072: Reference qualifiers in member templates causing extra indentation.

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov reopened this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. The patch breaks some tests, see

[PATCH] D68124: [clangd] Fix template type aliases in findExplicitReference

2019-09-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/FindTarget.cpp:478 + explicitReferenceTargets(DynTypedNode::create(L.getType()), + DeclRelation::Alias)}; }

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 222112. hokein added a comment. format the testcases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67907/new/ https://reviews.llvm.org/D67907 Files: clang-tools-extra/clangd/HeaderSourceSwitch.cpp

[PATCH] D67907: [clangd] Implement a smart version of HeaderSource switch.

2019-09-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/HeaderSourceSwitch.cpp:86 + auto AwardTarget = [&](const char *TargetURI) { +if (auto TargetPath = URI::resolve(TargetURI, OriginalFile)) { + if (*TargetPath != OriginalFile) // exclude the original

  1   2   >