Re: [PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

2015-10-01 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.concept/p7.cpp:13 @@ +12,3 @@ +template concept bool FCEI() { return true; } +template concept bool FCEI(); // expected-error {{function concept cannot be explicitly instantiated}}

Re: [PATCH] D13357: [Concepts] Add diagnostic; specializations of variable and function concepts

2015-10-01 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.concept/p7.cpp:4 @@ +3,3 @@ +template concept bool VCEI { true }; +template concept bool VCEI; // expected-error {{variable concept cannot be explicitly instantiated}} + --

Re: [PATCH] D11916: [CONCEPTS] Add diagnostic; invalid tag when concept specified

2015-08-11 Thread Hubert Tong via cfe-commits
>From Aaron's description of the user experience, I think the err_concept_decl_non_template message text is good (although err_concept_decl_non_template might need to be renamed). -- HT On Tue, Aug 11, 2015 at 4:01 PM, Aaron Ballman wrote: > On Tue, Aug 11, 2015 at 3:36 PM, Nathan Wilson > wro

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-08-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1982 @@ -1981,1 +1981,3 @@ "function concept cannot have exception specification">; +def err_concept_decl_invalid_sepcifiers : Error< + "%select{variable|function}0 concept can

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-08-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:1982 @@ -1981,1 +1981,3 @@ "function concept cannot have exception specification">; +def err_concept_decl_invalid_sepcifiers : Error< + "%select{variable|function}0 concept can

r246600 - Fix assertion failure in TransformOpaqueValueExpr

2015-09-01 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Tue Sep 1 17:50:31 2015 New Revision: 246600 URL: http://llvm.org/viewvc/llvm-project?rev=246600&view=rev Log: Fix assertion failure in TransformOpaqueValueExpr Summary: `OpaqueValueExpr`s may not have a source expression (as in the case when they are created

Re: [PATCH] D12435: [Concepts] Add diagnostic; invalid specifier on function or variable concept declaration

2015-09-04 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D12435 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

Re: [PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2015-10-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/Decl.h:1577 @@ -1576,2 +1576,3 @@ bool IsConstexpr : 1; + bool IsConcept : 1; nwilson wrote: > faisalv wrote: > > My inclination would have been to add this bit to FunctionTemplateDe

Re: [PATCH] D14316: [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1

2015-11-03 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D14316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

Re: [PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-04 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaDecl.cpp:7575 @@ +7574,3 @@ +// following restrictions: +// — The declaration’s parameter list shall be equivalent to an empty +// parameter list. I think the U+2014 s

Re: [PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-04 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp:7 @@ +6,2 @@ +template +concept bool fcpi(int i = 0) { return true; } // expected-error {{function concept cannot have any parameters}} hubert.

Re: [PATCH] D14352: Add diagnostics which fall under [dcl.spec.concept]p5

2015-11-05 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D14352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

r276069 - Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-07-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Tue Jul 19 19:30:15 2016 New Revision: 276069 URL: http://llvm.org/viewvc/llvm-project?rev=276069&view=rev Log: Concepts: Create space for requires-clause in TemplateParameterList; NFC Summary: Space for storing the //constraint-expression// of the //requires-

r276071 - Fix r276069: use LLVM_CONSTEXPR

2016-07-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Tue Jul 19 19:41:30 2016 New Revision: 276071 URL: http://llvm.org/viewvc/llvm-project?rev=276071&view=rev Log: Fix r276069: use LLVM_CONSTEXPR Modified: cfe/trunk/lib/AST/ASTContext.cpp Modified: cfe/trunk/lib/AST/ASTContext.cpp URL: http://llvm.org/vie

r276073 - Fix r276069: add default argument for new parameter

2016-07-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Tue Jul 19 19:57:56 2016 New Revision: 276073 URL: http://llvm.org/viewvc/llvm-project?rev=276073&view=rev Log: Fix r276069: add default argument for new parameter Modified: cfe/trunk/include/clang/AST/DeclTemplate.h Modified: cfe/trunk/include/clang/AST/

r276074 - Revert r276069: MSVC bots not happy

2016-07-19 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Tue Jul 19 20:05:31 2016 New Revision: 276074 URL: http://llvm.org/viewvc/llvm-project?rev=276074&view=rev Log: Revert r276069: MSVC bots not happy Modified: cfe/trunk/include/clang/AST/DeclTemplate.h cfe/trunk/lib/AST/ASTContext.cpp cfe/trunk/lib/

[PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-22 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: aaron.ballman, faisalv, rsmith. hubert.reinterpretcast added a subscriber: cfe-commits. This change fixes issues with `LLVM_CONSTEXPR` functions and `TrailingObjects::FixedSizeStorage`. In particular, some of th

Re: [PATCH] D22702: [libcxx]Missing default argument for flag_type parameter in one of std::basic_regex constructors

2016-07-25 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Minor concerns noted. I'd be okay with this patch, but would like someone else to give the okay (or indicate what issues need to be addressed). Comment at: include/regex:148 @@ -147,3 +147,3 @@ explicit basic_regex(const charT* p, fl

Re: [PATCH] D22698: [libcxx] Missing member types 'traits_type' and 'string_type' in class basic_regex

2016-07-25 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. This looks straightforward. @mclow.lists, are you okay with me committing this for Jason? https://reviews.llvm.org/D22698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D22824: MathExtras.h: add LLVM_CONSTEXPR where simple

2016-07-26 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: aaron.ballman, faisalv, rsmith. hubert.reinterpretcast added a subscriber: cfe-commits. This change adds `LLVM_CONSTEXPR` to functions selected as follows: - the body is already valid under C++11 for a `constexpr

Re: [PATCH] D22824: MathExtras.h: add LLVM_CONSTEXPR where simple

2016-07-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/llvm/Support/MathExtras.h:672 @@ -669,2 +671,3 @@ inline uint64_t alignTo(uint64_t Value, uint64_t Align, uint64_t Skew = 0) { + assert(Align != 0u); Skew %= Align; aaron.ballman wrote: > Usual

Re: [PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-28 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In https://reviews.llvm.org/D22668#499164, @aaron.ballman wrote: > I don't suppose there's a way to test these changes, is there? It's a utility class (which is not even used yet). I am not aware of testing for the ADTs, etc. aside from using them intern

Re: [PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-29 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 66179. hubert.reinterpretcast added a comment. Address review comments: add tests, access control, Doxygen https://reviews.llvm.org/D22668 Files: include/llvm/Support/AlignOf.h include/llvm/Support/MathExtras.h include/llvm/Support/Trai

Re: [PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-29 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 66185. hubert.reinterpretcast marked an inline comment as done. hubert.reinterpretcast added a comment. Avoid MSVC C4099: replace 'struct' with 'class' https://reviews.llvm.org/D22668 Files: include/llvm/Support/AlignOf.h include/llvm/Sup

Re: [PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-29 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 66186. hubert.reinterpretcast added a comment. Replace call to LLVM_CONSTEXPR function in constant expression context https://reviews.llvm.org/D22668 Files: include/llvm/Support/AlignOf.h include/llvm/Support/MathExtras.h include/llvm/S

Re: [PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-29 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 66190. hubert.reinterpretcast added a comment. Make FixedSizeStorageOwner accessible to test code https://reviews.llvm.org/D22668 Files: include/llvm/Support/AlignOf.h include/llvm/Support/MathExtras.h include/llvm/Support/TrailingObjec

Re: [PATCH] D22668: TrailingObjects::FixedSizeStorage constexpr fixes

2016-07-29 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 66194. hubert.reinterpretcast added a comment. Make FixedSizeStorage accessible to test code FixedSizeStorage and not FixedSizeStorageOwner is what the test code needs. Use alias template to avoid issues with MSVC. https://reviews.llvm.org/D

r277286 - Reapply r276069 with workaround for MSVC 2013

2016-07-30 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Sat Jul 30 17:33:34 2016 New Revision: 277286 URL: http://llvm.org/viewvc/llvm-project?rev=277286&view=rev Log: Reapply r276069 with workaround for MSVC 2013 Modified: cfe/trunk/include/clang/AST/DeclTemplate.h cfe/trunk/lib/AST/ASTContext.cpp cfe/

Re: [PATCH] D22698: [libcxx] Missing member types 'traits_type' and 'string_type' in class basic_regex

2016-08-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D22698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[libcxx] r277526 - [libcxx] basic_regex: add traits_type, string_type

2016-08-02 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Tue Aug 2 16:34:48 2016 New Revision: 277526 URL: http://llvm.org/viewvc/llvm-project?rev=277526&view=rev Log: [libcxx] basic_regex: add traits_type, string_type Summary: In the synopsis in C++11 subclause 28.8 [re.regex], `basic_regex` is specified to have m

r277658 - [Concepts] remove default argument for RequiresClause; NFC

2016-08-03 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Wed Aug 3 17:07:50 2016 New Revision: 277658 URL: http://llvm.org/viewvc/llvm-project?rev=277658&view=rev Log: [Concepts] remove default argument for RequiresClause; NFC Modified: cfe/trunk/include/clang/AST/DeclTemplate.h Modified: cfe/trunk/include/cla

Re: [PATCH] D22702: [libcxx]Missing default argument for flag_type parameter in one of std::basic_regex constructors

2016-08-07 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D22702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[libcxx] r277966 - [libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor

2016-08-07 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Sun Aug 7 17:18:33 2016 New Revision: 277966 URL: http://llvm.org/viewvc/llvm-project?rev=277966&view=rev Log: [libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor Summary: The synopsis in C++11 subclause 28.8 [re.regex] has: ``` basic_regex(const

[libcxx] r277967 - Revert r277966. Forgot patch attribution.

2016-08-07 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Sun Aug 7 17:23:24 2016 New Revision: 277967 URL: http://llvm.org/viewvc/llvm-project?rev=277967&view=rev Log: Revert r277966. Forgot patch attribution. Removed: libcxx/trunk/test/std/re/re.regex/re.regex.construct/ptr_size.pass.cpp Modified: libcxx/t

[libcxx] r277968 - [libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor

2016-08-07 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Sun Aug 7 17:26:04 2016 New Revision: 277968 URL: http://llvm.org/viewvc/llvm-project?rev=277968&view=rev Log: [libcxx] Add "flag" default arg: basic_regex ptr_size_flag ctor Summary: The synopsis in C++11 subclause 28.8 [re.regex] has: ``` basic_regex(const

Re: [PATCH] D22996: [cxx1z-constexpr-lambda] Implement constant evaluation of non-capturing lambda expressions.

2016-08-07 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/AST/ExprConstant.cpp:5775 @@ +5774,3 @@ +Info.FFDiag(E, diag::note_unimplemented_constexpr_lambda_feature_ast) +<< "can not evaluate lambda expressions with captures"; +return false; Min

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-02-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#340515, @nemanjai wrote: > If the reviewers don't mind, I would like to keep this patch with diagnostics > for interoperability between the two types for now. This is simply because > enabling such interoperability requir

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-02-03 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaExpr.cpp:1156-1159 @@ +1155,6 @@ + + QualType LHSElemType = dyn_cast(LHSType) ? +cast(LHSType)->getElementType() : LHSType; + QualType RHSElemType = dyn_cast(RHSType) ? +cast(RHSType)->getElementType(

Re: [PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2016-02-03 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Minor comments; otherwise, LGTM. Comment at: lib/Sema/SemaDecl.cpp:6007 @@ +6006,3 @@ + // applied only to the definition of a [...] variable template, declared + // in namespace scope. [...] A concept definition refers to [...]

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-09 Thread Hubert Tong via cfe-commits
There is a __LDBL_DECIMAL_DIG__ predefined macro. __DECIMAL_DIG__ will not always be the same as __LDBL_DECIMAL_DIG__. -- HT On Mon, Feb 8, 2016 at 11:26 PM, Jorge Teixeira via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi, I filed the bug (https://llvm.org/bugs/show_bug.cgi?id=26283) so

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-09 Thread Hubert Tong via cfe-commits
I see no immediate issue with this patch, but I am not one of the usual reviewers for this part of the code base. -- HT On Tue, Feb 9, 2016 at 2:56 PM, Jorge Teixeira wrote: > Thanks Hubert. Somehow I omitted that prefix when typing the macros, > and I did not noticed it when I was testing beca

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-02-09 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Basic/TargetInfo.cpp:231 @@ +230,3 @@ +if (hasFloat128Type() && +&getFloat128Format() == &llvm::APFloat::IEEEquad) + return Float128; Is it necessary to check that `__float128` is IEEE

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-02-10 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaExpr.cpp:1169 @@ +1168,3 @@ + if (LHSElemType == S.Context.Float128Ty && + RHSElemType == S.Context.LongDoubleTy) +return true; nemanjai wrote: > hubert.reinterpretcast wrote: > > I d

Re: [Diffusion] rL260577: In C11, provide macros FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, and LDBL_DECIMAL_DIG…

2016-02-11 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a subscriber: cfe-commits. Users: rsmith (Author) http://reviews.llvm.org/rL260577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [Diffusion] rL260577: In C11, provide macros FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, and LDBL_DECIMAL_DIG…

2016-02-11 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. /cfe/trunk/test/Headers/float.c:113 This check is invalid. The requirement that the set of values of the "smaller" types is a subset of the set of values the "larger" type does not establish the relationship being checked here. In particular, a larg

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-11 Thread Hubert Tong via cfe-commits
within test/Headers. > >>>>>> > >>>>>> I some sort of template exists, or if someone else takes point and > >>>>>> makes it, I can "port" the attached p11 test cases. I am unsure of > how > >&

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-12 Thread Hubert Tong via cfe-commits
;> >>>> > >> >>>> On Tue, Feb 9, 2016 at 5:56 PM, Richard Smith < > rich...@metafoo.co.uk> > >> >>>> wrote: > >> >>>>> On Tue, Feb 9, 2016 at 2:43 PM, Jorge Teixeira > >> >>>>> wrote: > >> >

r260710 - test/Headers/float.c: fix theoretical edge values

2016-02-12 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Fri Feb 12 13:24:36 2016 New Revision: 260710 URL: http://llvm.org/viewvc/llvm-project?rev=260710&view=rev Log: test/Headers/float.c: fix theoretical edge values For *_MANT_DIG, *_MAX_EXP and *_MIN_EXP, the C Standard does not list the least requirements direc

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-12 Thread Hubert Tong via cfe-commits
s to depend on the libc installed on the host >> >> >>> system. >> >> >>> >> >> >>>> Thanks for the help, >> >> >>>> >> >> >>>> JT >> >> >

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
c99-* are an aberration. The goal would be > that > >>> >> >>> this > >>> >> >>> test grows to cover all of the parts of float.h that we define, > so > >>> >> >>> float.c seems like the appropriate name for it. > &g

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
gt;> >>> Thanks, I modified the test to also test C89 and C99 modes > and > >> >>> >> >>> committed this as r260577. > >> >>> >> >>> > >> >>> >> >>> On Thu, Feb 11, 2016 at 11:29 AM, Jorg

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
gt;> >> >>> >> >> c89, c99 or c11 modes, clang should 1) use soft float (bad > >> >> >>> >> >> idea), > >> >> >>> >> >> 2) > >> >> >>> >> >&g

Re: Patch for Bug 26283: float.h is missing mandatory C11 fp macros like DBL_DECIMAL_DIG and LDBL_DECIMAL_DIG

2016-02-13 Thread Hubert Tong via cfe-commits
sts.gnu.org/archive/html/bug-gnulib/2011-08/msg00262.html, >> >> >> >>> >> >> http://www.openwall.com/lists/musl/2013/11/15/1), but >> all it >> >> >> >>> >> >> means >> >> >> >>> >

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-02-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:718 @@ -717,1 +717,3 @@ + if (TI.hasFloat128Type()) +DefineFloatMacros(Builder, "FLT128", &TI.getFloat128Format(), "Q"); I am concerned that setting these macros are

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-04-29 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/DeclTemplate.h:175 @@ -152,2 +174,3 @@ + Expr *RequiresClause; public: faisalv wrote: > Yuk - this entire guy (FizedSizeTemplateParameterListStorage) seems quite > fragile (dependent

Re: [PATCH] D19220: [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC

2016-04-29 Thread Hubert Tong via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL268081: [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC (authored by hubert.reinterpretcast). Changed prior to commit: http://reviews.llvm.org/D19220?vs=54050&id=55629#toc Repository

r268081 - [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC

2016-04-29 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Fri Apr 29 13:05:37 2016 New Revision: 268081 URL: http://llvm.org/viewvc/llvm-project?rev=268081&view=rev Log: [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC Summary: Prepare to store requires-clause expression for access via TemplateParam

[PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-04-30 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: rsmith, faisalv, aaron.ballman. hubert.reinterpretcast added subscribers: nwilson, cfe-commits, llvm-commits. This change introduces two types, `FixedSizeStorage` and `FixedSizeStorageOwner`, which can be used t

[PATCH] D19771: Rework FixedSizeTemplateParameterListStorage

2016-04-30 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast created this revision. hubert.reinterpretcast added reviewers: rsmith, faisalv, aaron.ballman. hubert.reinterpretcast added subscribers: nwilson, cfe-commits. This change replaces the custom FixedSizeTemplateParameterListStorage implementation with one that follows the inte

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-04-30 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. An example of using `FixedSizeStorage` can be found in http://reviews.llvm.org/D19771. Comment at: include/llvm/Support/TrailingObjects.h:352 @@ +351,3 @@ +template +using _ = +llvm::AlignedCharArrayhttp://reviews.llvm.or

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-04-30 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 55728. hubert.reinterpretcast added a comment. Use AlignOf instead of AlignmentCalcHelper Since BaseTy should be aligned properly for its trailing objects, the use of AlignmentCalcHelper is unnecessary. http://reviews.llvm.org/D19770 Files:

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-05-01 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast planned changes to this revision. hubert.reinterpretcast added a comment. The alias template hit a build-compiler bug: the substitution of the pack expansion of `Counts` does not work properly. I am investigating a replacement with a templated struct with a typedef member.

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-05-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 55820. hubert.reinterpretcast added a comment. Replace alias template with struct and typedef member; add usage example http://reviews.llvm.org/D19770 Files: include/llvm/Support/TrailingObjects.h Index: include/llvm/Support/TrailingObject

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-05-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast marked 5 inline comments as done. hubert.reinterpretcast added a comment. Responded to all comments. http://reviews.llvm.org/D19770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

Re: [PATCH] D19771: Rework FixedSizeTemplateParameterListStorage

2016-05-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 55825. hubert.reinterpretcast added a comment. Adjust for changes to http://reviews.llvm.org/D19770 http://reviews.llvm.org/D19771 Files: include/clang/AST/DeclTemplate.h Index: include/clang/AST/DeclTemplate.h

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-05-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 55850. hubert.reinterpretcast added a comment. Address Faisal's comment; supercedes http://reviews.llvm.org/D19771 Replaces the custom FixedSizeTemplateParameterListStorage implementation with one that follows the interface provided by llvm::T

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-05-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast marked 2 inline comments as done. hubert.reinterpretcast added a comment. @rsmith; I've addressed Faisal's comment. Please let me know if this patch (and http://reviews.llvm.org/D19770) is good to go. If it isn't ready yet, I'd like your opinion on http://reviews.llvm.org/

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-05-09 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Ping. http://reviews.llvm.org/D19322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-05-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 57216. hubert.reinterpretcast added a comment. Set requires-clause when creating TemplateParameterLists; NFC Removes the default argument for the requires-clause constraint expression in TemplateParameterList::Create. An appropriate argument

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-05-16 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Ping (#2). http://reviews.llvm.org/D19322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r266226 - Remove redundant null-check; NFC

2016-04-13 Thread Hubert Tong via cfe-commits
Author: hubert.reinterpretcast Date: Wed Apr 13 13:41:03 2016 New Revision: 266226 URL: http://llvm.org/viewvc/llvm-project?rev=266226&view=rev Log: Remove redundant null-check; NFC Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp URL: http://llv

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-04-20 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 54455. hubert.reinterpretcast added a comment. Store the RequiresClause expression into the created storage; add accessor; add unnecessary parens to silence warning http://reviews.llvm.org/D19322 Files: include/clang/AST/DeclTemplate.h li

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-04-20 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 54456. hubert.reinterpretcast added a comment. Actually add parens this time http://reviews.llvm.org/D19322 Files: include/clang/AST/DeclTemplate.h lib/AST/DeclTemplate.cpp lib/Sema/SemaTemplateDeduction.cpp Index: lib/Sema/SemaTemplat

Re: [PATCH] D19220: [Concepts] Pass requires-clause to ActOnTemplateParameterList; NFC

2016-04-26 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Ping. http://reviews.llvm.org/D19220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-21 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Ping. http://reviews.llvm.org/D19770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

2016-06-21 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Ping. http://reviews.llvm.org/D19322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-22 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/llvm/Support/TrailingObjects.h:353 @@ +352,3 @@ + /// + /// \code{.cpp} + /// aaron.ballman wrote: > That's novel (we use it in two other places from what I can tell). This is a documented Doxyge

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 61763. hubert.reinterpretcast added a comment. Update to r273650 with the requested const accessor http://reviews.llvm.org/D19770 Files: include/llvm/Support/TrailingObjects.h Index: include/llvm/Support/TrailingObjects.h =

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
On Fri, Jun 24, 2016 at 3:00 PM, Aaron Ballman wrote: > aaron.ballman added a comment. > > Did Richard sign off on this off-line? Also, this has caused a bot failure: > That was my understanding. > > 7:57 AM build #4390 of ninja-clang-i686-msc19-R is complete: > Failure [failed build_clang_too

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
On Fri, Jun 24, 2016 at 3:07 PM, Aaron Ballman wrote: > On Fri, Jun 24, 2016 at 8:05 AM, Hubert Tong > wrote: > > On Fri, Jun 24, 2016 at 3:00 PM, Aaron Ballman > > wrote: > >> > >> aaron.ballman added a comment. > >> > >> Did Richard sign off on this off-line? Also, this has caused a bot > >>

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
Working to reverse the patch. I need someone with MSVC to help me. -- HT On Fri, Jun 24, 2016 at 3:19 PM, Aaron Ballman wrote: > On Fri, Jun 24, 2016 at 8:16 AM, Hubert Tong > wrote: > > On Fri, Jun 24, 2016 at 3:07 PM, Aaron Ballman > > wrote: > >> > >> On Fri, Jun 24, 2016 at 8:05 AM, Huber

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
STL's not at the meeting this week. I'll try to catch someone at the meeting to see if we can figure out how to get the compiler to squint the right way at the code first. -- HT On Fri, Jun 24, 2016 at 3:47 PM, Aaron Ballman wrote: > On Fri, Jun 24, 2016 at 8:25 AM, Aaron Ballman > wrote: > >

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast marked 6 inline comments as done. hubert.reinterpretcast added a comment. http://reviews.llvm.org/D19770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast updated this revision to Diff 61844. hubert.reinterpretcast added a comment. Reapply r273664 with workaround for MSVC http://reviews.llvm.org/D19770 Files: include/llvm/Support/TrailingObjects.h Index: include/llvm/Support/TrailingObjects.h

Re: [PATCH] D19770: Add FixedSizeStorage to TrailingObjects; NFC

2016-06-24 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/llvm/Support/TrailingObjects.h:363 @@ +362,3 @@ +template struct with_counts { + enum { Size = totalSizeToAlloc(Counts...) }; + typedef llvm::AlignedCharArray< @aaron.ballman; my atte

Re: [PATCH] D19771: Rework FixedSizeTemplateParameterListStorage

2016-07-15 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast abandoned this revision. hubert.reinterpretcast added a comment. This is superseded by https://reviews.llvm.org/D19322. https://reviews.llvm.org/D19771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-03-01 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1658 @@ -1657,1 +1657,3 @@ } else if (FromType->isRealFloatingType() && ToType->isRealFloatingType()) { +// FIXME: disable conversions between long double and __float128 if +// their rep

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-03-02 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1658 @@ -1657,1 +1657,3 @@ } else if (FromType->isRealFloatingType() && ToType->isRealFloatingType()) { +// FIXME: disable conversions between long double and __float128 if +// their rep

Re: [PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2016-01-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/DeclTemplate.h:373 @@ -372,1 +372,3 @@ + /// Whether this is a (C++ Concepts TS) function concept. + bool isConcept() const { return TemplatedDecl.getInt(); } This code is not limited

Re: [PATCH] D13357: [Concepts] Diagnose when 'concept' is specified on a specialization

2016-01-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: include/clang/AST/DeclTemplate.h:375 @@ +374,3 @@ + bool isConcept() const { return TemplatedDecl.getInt(); } + void setConcept(bool IC) { TemplatedDecl.setInt(true); } + nwilson wrote: > hubert.reinterpr

Re: [PATCH] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. Please add tests for `const bool` for both the function and variable cases (should get the error). Comment at: test/CXX/concepts-ts/dcl.dcl/dcl.spec/dcl.spec.concept/p5.cpp:22 @@ +21,3 @@ +template +concept auto fcrta(void) -> bool { retu

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-13 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:550 @@ -548,1 +549,3 @@ case BuiltinType::Double: +// FIXME: For targets where lond double and __float128 have the same size, +// they are currently indistinguishable in the debugger w

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-14 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: lib/AST/ASTContext.cpp:4635 @@ +4634,3 @@ + // If the two sides have Float128Rank and LongDoubleRank and the two types + // have the same representation on this platform, they have equal rank. + if ((LHSR == LongDoubleRa

Re: [PATCH] D16163: [Concepts] Diagnose when return type of a function concept or declaration type of a variable concept is not bool.

2016-01-21 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM. http://reviews.llvm.org/D16163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-26 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#336430, @rjmccall wrote: > As I understand it, PPC's long-double (~103 bits of precision) is still > strictly less precise than float128_t (113 bits of precision), so it ought to > be have lower rank. Is there actually a

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-26 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#336827, @rjmccall wrote: > Here's the thing, though: I don't think there's a reasonable language > solution here besides saying that float128_t has higher rank. You can't make > the types incompatible, because it's clear

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-26 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#336891, @rjmccall wrote: > > The C committee decided that "undefined behavior" was what they could agree > > on for this sort of case. > > > That's only when the operand value is actually outside of the range of the > typ

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-27 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#337144, @nemanjai wrote: > Do you suggest that we need to allow operations (or at least assignments) > between the two types and take away the diagnostics that are part of this > patch? My overriding concern at this tim

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-27 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#337144, @nemanjai wrote: > Do you suggest that we need to allow operations (or at least assignments) > between the two types and take away the diagnostics that are part of this > patch? My overriding concern at this tim

Re: [PATCH] D15120: Add support for __float128 type to be used by targets that support it

2016-01-27 Thread Hubert Tong via cfe-commits
hubert.reinterpretcast added a comment. In http://reviews.llvm.org/D15120#337384, @rjmccall wrote: > I think it's not unlikely that float128_t will see future standardization (as > an optional extension, of course), and it would be strange for an operation > between two types to not consistentl

<    1   2   3   4   5   >