[PATCH] D50390: [SEMA]Uniform printing of Attributes

2018-08-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: aaron.ballman, rjmccall. The recent patch that reordered parsed attributes made it clear that the diagnostics when printing attributes were incredibly inconsistent. in the mutual-exclusion case, the order of the attributes would chang

[PATCH] D50390: [SEMA]Uniform printing of Attributes

2018-08-07 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Sema/ParsedAttr.h:956 + +inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB, + const ParsedAttr *At) { Note that the pointer-overload is requ

[PATCH] D50471: [Builtins] Add __bulitin_clrsb support to IntExprEvaluator::VisitBuiltinCallExpr

2018-08-08 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. Looks easy enough, just note the test issue. Comment at: test/Sema/constant-builtins-2.c:191 +char clrsb11[__builtin_clrsb(0xf) == BITSIZE(int) - 5 ? 1 : -1]; +char c

[PATCH] D50390: [SEMA]Uniform printing of Attributes

2018-08-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. After talking to Aaron, we're going to try to use the lexical names for ALL cases. This requires a bunch of of accessory work (in order to get the Identifier from the SourceRange), so it'll be split up into a couple of commits and

[PATCH] D50531: [NFC] Convert ParsedAttr to use llvm::TrailingObjects

2018-08-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: rjmccall, riccibruno, aaron.ballman. ParsedAttr is using a hand-rolled trailing-objects implementation that gets cleaned up quite a bit by just using llvm::TrailingObjects. This is a large TrailingObjects list, but most things are leng

[PATCH] D50531: [NFC] Convert ParsedAttr to use llvm::TrailingObjects

2018-08-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Sema/ParsedAttr.h:80 +struct TypeTagForDatatypeData { + ParsedType *MatchingCType; Because all of these became part of the TYPE of ParsedAttr now, they need to be defined outside of ParsedAttr. Addi

[PATCH] D50531: [NFC] Convert ParsedAttr to use llvm::TrailingObjects

2018-08-09 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339380: [NFC] Convert ParsedAttr to use llvm::TrailingObjects (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D50531?v

[PATCH] D50630: [AST] Update/correct the static_asserts for the bit-fields in Type

2018-08-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/AST/Type.h:1639 + +static_assert(sizeof(TypeBitfields) <= 4, + "TypeBitfields is larger than 4 bytes!"); I don't really see value in ensuring that TypeBitfields is <= 4 bytes, it see

[PATCH] D50631: [AST] Stuff more data into FunctionTypeBitfields

2018-08-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: rsmith. erichkeane added inline comments. Comment at: include/clang/AST/Type.h:1527 +/// The number of parameters this function has, not counting '...'. +unsigned NumParams : 12; + This concerns me a bit with variadic templa

[PATCH] D50643: [AST] Pack the bits of TemplateSpecializationType into Type

2018-08-13 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think that this causes UB. The Type baseclass will use the TypeBitfields active member, but this uses the TemplateSpecializationTypeBits, right? I know we take advantage of this elsewhere, but I'm tentative about this one... Repository: rC Clang https://revie

[PATCH] D50643: [AST] Pack the bits of TemplateSpecializationType into Type

2018-08-13 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. Ah, right. I missed that the others already do it. Fine I guess... Repository: rC Clang https://reviews.llvm.org/D50643 ___ cfe-comm

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/AST/Type.h:1634 + +/// The number of template arguments in \c Arguments. +/// Intentionally not a bitfield since we have plenty of space left. I would love it if we commented what a reasonable nu

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/AST/Type.h:1634 + +/// The number of template arguments in \c Arguments. +/// Intentionally not a bitfield since we have plenty of space left. riccibruno wrote: > erichkeane wrote: > > I would lo

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D50713#1200564, @riccibruno wrote: > The thing is that I have no idea what is the minimum number > of bits required. It was originally an unsigned but I suspect that > 32 bits are not needed. Looking at [implimits] I see > > Template arg

[PATCH] D50713: [AST] Pack the unsigned of SubstTemplateTypeParmPackType into Type

2018-08-15 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. Sorry about the long discussion on the comment... These bitfields are just hell on the next guy through if he doesn't have the context/knowledge of what are appropriate sizes. Reposi

[PATCH] D50640: Fix for bug 38508 - Don't do PCH processing when only generating preprocessor output

2018-08-17 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340025: Fix for bug 38508 - Don't do PCH processing when only generating preprocessor… (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D51026: [CodeGen] Implicitly set stackrealign on the main function, if custom stack alignment is used

2018-08-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:989 +CGM.getCodeGenOpts().StackAlignment) + Fn->addFnAttr("stackrealign"); + Is there not an attribute name for this already in LLVM? I guess I'm otherwise fine with this

[PATCH] D46535: Correct warning on Float->Integer conversions.

2018-05-08 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D46535#1091787, @efriedma wrote: > The check for whether an input is "out of range" doesn't handle fractions > correctly. Testcase: > > int a() { return 2147483647.5; } > unsigned b() { return -.5; } > Hrm... For some reaosn I had it

[PATCH] D43352: Add support for __declspec(code_seg("segname"))

2018-05-16 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC332470: Add support for __declspec(code_seg("segname")) (authored by erichkeane, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D43352?vs=1470

[PATCH] D43352: Add support for __declspec(code_seg("segname"))

2018-05-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Woops, forgot the tests when commiting, so see R332492 for the lit tests. Repository: rC Clang https://reviews.llvm.org/D43352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D45686: [Tooling] Clean up tmp files when creating a fixed compilation database

2018-05-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:303 + // Remove temp files. + Compilation->CleanupFileList(Compilation->getTempFiles()); + It seems to me that this would be best called from the destructor of the Compilation ob

[PATCH] D45686: [Driver] Clean up tmp files when deleting Compilation objects

2018-05-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Driver/Compilation.cpp:42 + TranslatedArgs(_TranslatedArgs), ContainsError(ContainsError), + KeepTempFiles(D.isSaveTempsEnabled()) { // The offloading host toolchain is the default toolchain. I'd pref

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-05-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: mikerice, echristo, aaron.ballman, gbiv. Herald added a reviewer: george.burgess.iv. Herald added a subscriber: mgrang. As documented here: https://software.intel.com/en-us/node/682969 and https://software.intel.com/en-us/node/523346.

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-05-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 2 inline comments as done. erichkeane added a comment. Woops, looks like I lost those in the rebase. Thanks for catching them! Repository: rC Clang https://reviews.llvm.org/D47474 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-05-29 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 148977. https://reviews.llvm.org/D47474 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TargetInf

[PATCH] D38202: Add Documentation to attribute-nothrow. Additionally, limit to functions.

2017-09-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked an inline comment as done. erichkeane added inline comments. Comment at: include/clang/Basic/AttrDocs.td:2692 + let Content = [{ +Clang supports the GNU style ``__attribute__((nothrow))`` attribute as an +equivilent of `noexcept` on function declarations. This

[PATCH] D38202: Add Documentation to attribute-nothrow. Additionally, limit to functions.

2017-09-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 116705. erichkeane added a comment. Added declspec, fixed does cannot. https://reviews.llvm.org/D38202 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td test/Misc/pragma-attribute-supported-attributes-list.test Index: test/Misc/p

[PATCH] D38209: [Sema] Correct nothrow inherited by noexcept

2017-09-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D38209#880559, @aaron.ballman wrote: > In https://reviews.llvm.org/D38209#880553, @STL_MSFT wrote: > > > > do you think `__declspec(nothrow)` calling the terminate handler in Clang > > > is a bug? > > > > It's certainly a behavior differenc

[PATCH] D38203: [Sema] Corrected the warn-on-throw-from-noexcept behavior to include nothrow

2017-09-26 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314229: [Sema] Corrected the warn-on-throw-from-noexcept behavior to include nothrow (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38203?vs=116426&id=116729#toc Repositor

[PATCH] D36487: Emit section information for extern variables.

2017-09-26 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314262: Emit section information for extern variables. (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D36487?vs=116581&id=116739#toc Repository: rL LLVM https://reviews

[PATCH] D38209: [Sema] Correct nothrow inherited by noexcept

2017-09-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 116840. erichkeane marked 2 inline comments as done. erichkeane added a comment. 2 small changes @aaron.ballman requested. https://reviews.llvm.org/D38209 Files: lib/Sema/SemaDeclCXX.cpp test/SemaCXX/nothrow-as-noexcept-ctor.cpp Index: test/SemaCXX

[PATCH] D38303: [Sema] Correct IUnknown to support Unknwnbase.h Header.

2017-09-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 116876. erichkeane added a comment. As @rnk suggested, pull my condition out into a static function. https://reviews.llvm.org/D38303 Files: lib/AST/DeclCXX.cpp test/SemaCXX/ms-iunknown-template-function.cpp test/SemaCXX/ms-iunknown.cpp Index: lib/

[PATCH] D38205: [Sema] Warn on attribute nothrow conflicting with language specifiers

2017-09-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 116892. erichkeane marked 2 inline comments as done. erichkeane added a comment. changes that were suggested by @aaron.ballman It DOES warn on the template correctly, however I'm not thrilled that it misses the 'warning' info. Any idea how I can get that

[PATCH] D38202: Add Documentation to attribute-nothrow. Additionally, limit to functions.

2017-09-28 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314456: Add Documentation to attribute-nothrow. Additionally, limit to functions. (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38202?vs=116705&id=117044#toc Repository:

[PATCH] D38205: [Sema] Warn on attribute nothrow conflicting with language specifiers

2017-09-28 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314461: [Sema] Warn on attribute nothrow conflicting with language specifiers (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38205?vs=116892&id=117050#toc Repository: rL

[PATCH] D38209: [Sema] Correct nothrow inherited by noexcept

2017-09-28 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314462: [Sema] Correct nothrow inherited by noexcept (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38209?vs=116840&id=117053#toc Repository: rL LLVM https://reviews.ll

[PATCH] D38303: [Sema] Correct IUnknown to support Unknwnbase.h Header.

2017-09-29 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314557: [Sema] Correct IUnknown to support Unknwnbase.h Header. (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38303?vs=116876&id=117218#toc Repository: rL LLVM https:/

[PATCH] D38303: [Sema] Correct IUnknown to support Unknwnbase.h Header.

2017-10-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. @chapuni Thanks for the fix! That 'novtable' line is there simply because that is supposed to be a minimized replica of what happens in the UnknwnBase.h header. I'll likely just remove the attribute and your fix, since the warning itself isn't important to the test

[PATCH] D38596: Implement attribute target multiversioning

2017-10-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. GCC's attribute 'target', in addition to being an optimization hint, also allows function multiversioning. We currently have the former implemented, this is the latter's implementation. Note that it ends up having to permit redefinition of functions so that they

[PATCH] D38596: Implement attribute target multiversioning

2017-10-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D38596#889682, @hfinkel wrote: > Can you explain briefly what is required of the system in order to support > this (is it just ifunc support in the dynamic linker / loader)? Yep, this feature depends entirely on ifuncs. > In general, the

[PATCH] D38601: Enable amdfam15,amdfam15h, and amdfam10h support

2017-10-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. buildin_cpu_is already supports amdfam10h and amdfam15h, the 'sans-h' version to the check and enable it. Addtionally, add amdfam15 as an alias for bdver1, like amdfam10 is for barcelona. https://reviews.llvm.org/D38601 Files: lib/Basic/Targets/X86.cpp tes

[PATCH] D38601: Enable amdfam15,amdfam15h, and amdfam10h support

2017-10-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. Talking to Craig, this is just wrong for these features. Attribute-target does some funky things in order to make this work, so I'll just bring those 'hacks' into my other patch. https://reviews.llvm.org/D38601 ___

[PATCH] D38596: Implement attribute target multiversioning

2017-10-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 31 inline comments as done. erichkeane added a subscriber: rnk. erichkeane added a comment. Weew... I think I got everything. Thanks for the review you three! I've got another patch coming momentarily with what I believe is all your suggestions. Comment at:

[PATCH] D38596: Implement attribute target multiversioning

2017-10-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 118058. erichkeane marked 5 inline comments as done. erichkeane added a comment. All requested changes AFAIK. Also, discovered that I wasn't calling cpu-init at the beginning of my resolver, so added that. Note: Virtual functions seem to have a bunch of

[PATCH] D38596: Implement attribute target multiversioning

2017-10-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: rsmith. erichkeane added a comment. In https://reviews.llvm.org/D38596#891603, @aaron.ballman wrote: > The attribute and sema bits look good to me, but I agree that you might want > Richard's opinions before committing. Oh, definitely! I actually put this up for

[PATCH] D38596: Implement attribute target multiversioning

2017-10-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 118218. erichkeane added reviewers: rnk, rsmith. erichkeane added a comment. 1 more const-auto. Also noticed I'd missed that removing the 'default' caused the function to fallthrough, so I added llvm_unreachable to the bottom. https://reviews.llvm.org/D

[PATCH] D38700: [Sema][Crash] Correctly handle an non-dependent noexcept expr in function template

2017-10-09 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. It seems that all of the other templated cases are handled correctly, however the function template case was not correctly handled. This patch recovers from this condition by setting the function to noexcept after diagnosing. Previously it simply set NoexceptExp

[PATCH] D38596: Implement attribute target multiversioning

2017-10-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 118648. erichkeane added a comment. Craig noticed a pair of ordering issues in the TargetArray list, so fixed htose. https://reviews.llvm.org/D38596 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds

[PATCH] D38700: [Sema][Crash] Correctly handle an non-dependent noexcept expr in function template

2017-10-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Bump! I realize the two of you are super busy, but if anyone else on cfe-commits wants to take a look, I'd apprecate it! -Erich https://reviews.llvm.org/D38700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D38700: [Sema][Crash] Correctly handle an non-dependent noexcept expr in function template

2017-10-12 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315638: [Sema][Crash] Correctly handle an non-dependent noexcept expr in function… (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38700?vs=118245&id=118858#toc Repository:

[PATCH] D38969: Sort Attributes by "HeaderName"

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. Attributes in the docs were previously sorted (apparently) by the attribute name, so AnyX86Interrupt ended up being the first one, rather than in a meaningful place. This resulted in the 4 'interrupt' titled sections being all in different places. This replaces

[PATCH] D38969: Sort Attributes by "HeaderName"

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Additionally, I'm going to edit the 'interrupt' docs in a separate commit to give each a separate header name based on the architecture. Currently they are all named 'interrupt', so I want to rename them all interrupt (x86), etc. Look for a future review! ==

[PATCH] D38970: Clarify the 'interrupt' names in Attribute Docs

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. All 4 of the 'interrupt' headers were automatically named 'interrupt'. This patch gives them unique names. https://reviews.llvm.org/D38970 Files: include/clang/Basic/AttrDocs.td Index: include/clang/Basic/AttrDocs.td ===

[PATCH] D38969: Sort Attributes by "HeaderName"

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: utils/TableGen/ClangAttrEmitter.cpp:3670 + DocumentationData(const Record &Documentation, const Record &Attribute, +const std::pair &&HeadingAndKinds) + : Documentation(&Documentation), Attribute(&Attribute),

[PATCH] D38969: Sort Attributes by "HeaderName"

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119195. erichkeane added a comment. Change the constructor in DocumentationData to take by value. https://reviews.llvm.org/D38969 Files: utils/TableGen/ClangAttrEmitter.cpp Index: utils/TableGen/ClangAttrEmitter.cpp ===

[PATCH] D38969: Sort Attributes by "HeaderName"

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315931: Sort Attributes by "HeaderName" (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38969?vs=119195&id=119200#toc Repository: rL LLVM https://reviews.llvm.org/D3896

[PATCH] D38979: Fix usage in TableGen of getValueAsString

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. Record::getValueAsString returns a stringref to an interned string (apparently had been changed since most of tablegen was written). In this patch, I audited the usage of getValueAsString to find places where we can trivially stop storing 'std::string' and instea

[PATCH] D38979: Fix usage in TableGen of getValueAsString

2017-10-16 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315956: Fix usage in TableGen of getValueAsString (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D38979?vs=119218&id=119227#toc Repository: rL LLVM https://reviews.llvm.

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. As reported here: https://bugs.llvm.org/show_bug.cgi?id=34973 "catch(...)" should catch EVERYTHING, even a rethrow. This patch changes the order of the checks to ensure that the catch(...) will catch everything. https://reviews.llvm.org/D39013 Files: lib/Se

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Have a question on the behavior here, see inline. Comment at: lib/Sema/AnalysisBasedWarnings.cpp:299 if (!ThrowType) return false; if (ThrowType->isReferenceType()) The other potential fix here is to simply change this lin

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119379. erichkeane edited the summary of this revision. erichkeane added a comment. I've convinced myself that a re-throw with a catch around it should not be diagnosed, otherwise there is no way to suppress the warning in this case. It ends up being a f

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. > Wouldn't a catch-all handler suppress the warning in that case? e.g., Yep, you're right of course. I'll revert to my first patch and update this. I'd surmised that false-positives were worse than false-negatives, but since there is a trivial workaround, I'm ok wi

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119383. erichkeane edited the summary of this revision. erichkeane added a comment. Changes as requested by @aaron.ballman https://reviews.llvm.org/D39013 Files: lib/Sema/AnalysisBasedWarnings.cpp test/SemaCXX/warn-throw-out-noexcept-func.cpp Index

[PATCH] D39013: [CFG] Relax Wexceptions warning on rethrow

2017-10-17 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316030: [CFG] Relax Wexceptions warning on rethrow (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39013?vs=119383&id=119386#toc Repository: rL LLVM https://reviews.llv

[PATCH] D38596: Implement attribute target multiversioning

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. @rsmith and @rnk just a quick bump! I'd like to get your thoughts on the SEMA changes here. Thanks! -Erich https://reviews.llvm.org/D38596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D39064: implement __has_unique_object_representations

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. A helper builtin to facilitate implementing the std::has_unique_object_representations type trait. Requested here: https://bugs.llvm.org/show_bug.cgi?id=34942 Also already exists in GCC and MSVC. https://reviews.llvm.org/D39064 Files: include/clang/AST/Type.

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. As reported here https://bugs.llvm.org/show_bug.cgi?id=34988 [[nodiscard]] warnings were not being suppressed for volatile-ref return values. https://reviews.llvm.org/D39075 Files: lib/AST/Expr.cpp test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp Inde

[PATCH] D39064: implement __has_unique_object_representations

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119533. erichkeane marked 3 inline comments as done. https://reviews.llvm.org/D39064 Files: include/clang/AST/Type.h include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/AST/Type.cpp lib/Parse/ParseExpr.cpp lib/Sema/SemaExprC

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Expr.cpp:2302 + cast(DRE->getDecl())->hasLocalStorage()) && +!isa(CE->getSubExpr()->IgnoreParens())) { return CE->getSubExpr()->isUnusedResultAWarning(WarnE, Loc, aaron.ball

[PATCH] D39064: implement __has_unique_object_representations

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Parse/ParseExpr.cpp:719 /// '__is_union' +/// '__has_unique_object_representations' [MS] /// STL_MSFT wrote: > Should this be marked as MS if it's cross-vendor? Ah, right :)

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 119535. erichkeane added a comment. Added function-pointer test. https://reviews.llvm.org/D39075 Files: lib/AST/Expr.cpp test/CXX/dcl.dcl/dcl.attr/dcl.attr.nodiscard/p2.cpp Index: lib/AST/Expr.cpp ===

[PATCH] D39075: Fix nodiscard for volatile references

2017-10-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316166: Fix nodiscard for volatile references (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39075?vs=119535&id=119588#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D39104: Allow /showIncludes with /P

2017-10-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. r213589 was checked in as a solution to https://bugs.llvm.org/show_bug.cgi?id=20336. However, it is possible to use /EP with /P to suppress #line directives AND output to a file. There is no reason in that case to suppress /showIncludes. This was reported here:

[PATCH] D39104: Allow /showIncludes with /P

2017-10-20 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316225: Allow /showIncludes with /P (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39104?vs=119607&id=119686#toc Repository: rL LLVM https://reviews.llvm.org/D39104 Fil

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:4811 + TemplateParameterList *Params = + cast(Template->getMostRecentDecl()) + ->getTemplateParameters(); mstorsjo wrote: > How does this work if there's another forward declar

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-22 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:4811 + TemplateParameterList *Params = + cast(Template->getMostRecentDecl()) + ->getTemplateParameters(); mstorsjo wrote: > erichkeane wrote: > > mstorsjo wrote: > > > How does

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain

[PATCH] D39064: implement __has_unique_object_representations

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2226 +Context.getFieldOffset(*Record->field_begin())); +for (const auto *Field : Record->fields()) { + if (!Field->getType().hasUniqueObjectRepresentations(Context)) rnk wrote: > What

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-23 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316405: Fix template parameter default args missed if redecled (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39127?vs=119665&id=119991#toc Repository: rL LLVM https://

[PATCH] D39127: Fix template parameter default args missed if redecled

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D39127#904685, @rnk wrote: > I think you forgot to svn add the test case Ugg... thanks for the heads up! Added in r316437 Repository: rL LLVM https://reviews.llvm.org/D39127 ___ cfe-comm

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2226 +Context.getFieldOffset(*Record->field_begin())); +for (const auto *Field : Record->fields()) { + if (!Field->getType().hasUniqueObjectRepresentations(Context)) erichkeane wrote:

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120106. erichkeane added a comment. Based on @rnk s comments, I discovered that base-class handling is more difficult than I suspected! I added a couple more tests and am properly handling base classes. https://reviews.llvm.org/D39064 Files: include

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/AST/Type.cpp:2212-2213 +for (const auto Base : ClassDecl->bases()) { + if (Base.isVirtual()) +return false; + rnk wrote: > OK, I guess vbases don't have a unique representation. :) What about vtab

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120132. erichkeane added a comment. Adding tests for excluding dynamic types. https://reviews.llvm.org/D39064 Files: include/clang/AST/Type.h include/clang/Basic/TokenKinds.def include/clang/Basic/TypeTraits.h lib/AST/Type.cpp lib/Parse/ParseEx

[PATCH] D39064: implement __has_unique_object_representations

2017-10-24 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316518: mplement __has_unique_object_representations (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39064?vs=120132&id=120137#toc Repository: rL LLVM https://reviews.ll

[PATCH] D51650: Implement target_clones multiversioning

2018-09-04 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: thiagomacieira, aaron.ballman. As discussed here: https://lwn.net/Articles/691932/ GCC6.0 adds target_clones multiversioning. This functionality is an odd cross between the cpu_dispatch and 'target' MV, but is compatible with neither.

[PATCH] D51650: Implement target_clones multiversioning

2018-09-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 164251. erichkeane marked 9 inline comments as done. erichkeane added a comment. fix aaron's comments. https://reviews.llvm.org/D51650 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td include/clang/Basic

[PATCH] D51650: Implement target_clones multiversioning

2018-09-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Based on feedback from @rsmith I've been trying to get this to work with Lambdas like GCC does, though I'm quite confused about how to go about it here. It seems that the lambda definition call operator is deferred, however I'm having a hard time making sure that th

[PATCH] D51650: Implement target_clones multiversioning

2018-09-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Thanks for the feedback @rsmith! I'm working through the lambda issue and a few other things, but will get to this as soon as I can. Comment at: include/clang/Basic/Attr.td:2031-2042 +mutable unsigned ActiveArgIndex = 0; +void AdvanceActive

[PATCH] D51510: Move AESNI generation to Skylake and Goldmont

2018-09-10 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341862: Move AESNI generation to Skylake and Goldmont (authored by erichkeane, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51510?vs=163415

[PATCH] D52000: Feedback/direction Review for cpu-dispatch emit stage into GlobalDecl

2018-09-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added a reviewer: rsmith. Herald added a subscriber: cfe-commits. In the feedback in https://reviews.llvm.org/D51650 (https://reviews.llvm.org/D51650), @rsmith points out an implementation detail of CPU-Dispatch is improperly done. I'd like to fix thi

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Lex/LiteralSupport.cpp:815 .Cases("il", "i", "if", true) + .Cases("d", "y", LangOpts.CPlusPlus2a) .Default(false); aaron.ballman wrote: > Is it possible for the library to expose those outside o

[PATCH] D49466: Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:118 "invalid deployment target for -stdlib=libc++ (requires %0 or later)">; +def err_drv_invalid_argument_to_fmacro_prefix_map : Error< + "invalid argument '%0' to -fmacro-prefix-map">;

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 156252. erichkeane marked 4 inline comments as done. erichkeane added a comment. @aaron.ballman s comments. https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined-literals.cpp Index: lib/Lex/LiteralSupport

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:23 +// expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}} +// expected-note@9{{candidate constructor (the implicit copy constructor)}} +// expected-note@9{{candidate cons

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: test/SemaCXX/cxx2a-user-defined-literals.cpp:23 +// expected-error@+3{{no viable conversion from 'int' to 'chrono::day'}} +// expected-note@9{{candidate constructor (the implicit copy constructor)}} +// expected-note@9{{candidate cons

[PATCH] D49504: Enable C++2a Chrono Literals

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337454: Enable C++2a Chrono Literals (authored by erichkeane, committed by ). Repository: rC Clang https://reviews.llvm.org/D49504 Files: lib/Lex/LiteralSupport.cpp test/SemaCXX/cxx2a-user-defined

[PATCH] D49466: Initial implementation of -fmacro-prefix-mapand -ffile-prefix-map

2018-07-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Lex/PreprocessorOptions.h:171 + /// A prefix map for __FILE__ and __BASEFILE__ + std::map MacroPrefixMap; + dankm wrote: > erichkeane wrote: > > erichkeane wrote: > > > It seems this can be StringRefs

[PATCH] D47474: Implement cpu_dispatch/cpu_specific Multiversioning

2018-07-20 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337552: Implement cpu_dispatch/cpu_specific Multiversioning (authored by erichkeane, committed by ). Repository: rC Clang https://reviews.llvm.org/D47474 Files: include/clang/AST/Decl.h include/cl

  1   2   3   4   5   6   7   8   9   10   >