[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-10-08 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. In D133853#3808674 , @aaron.ballman wrote: > Now I'm wondering why the attribute exists at all. If it's functionally > equivalent to `constexpr` as a keyword, what are the use cases for the > attribute? It appears that

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-12-05 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. Yes, I need someone to commit it on my behalf. My name and email address: `Tan S. B. ` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114583/new/ https://reviews.llvm.org/D114583 ___ cfe-commits mailing list

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-30 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 390890. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114583/new/ https://reviews.llvm.org/D114583 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTest.cpp Index: clang/unittests/Format/FormatTest.cpp

[PATCH] D114583: [clang-format] Adjust braced list detection

2021-11-25 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 389822. cpplearner added a comment. Fixed tests. Since in JavaScript, the thing after `extends` must be an expression, and the thing after `implements` must be an object type, I decided to parse both as braced lists without going through

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2020-05-22 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 265683. cpplearner added a comment. rebase & ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 Files: clang/lib/AST/Type.cpp clang/test/SemaTemplate/alias-templates.cpp Index:

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2020-02-04 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-09-10 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. In D65050#1608777 , @efriedma wrote: > > this looks like it could be a Core Issue > > I think the issue is clang-specific. clang splits the standard notion of a > dependent type into two separate bits, for the sake of

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-09-10 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. ping @rsmith CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47419: [SemaDeclCXX] Allow inheriting constructor declaration that specify a cv-qualified type

2019-08-17 Thread S. B. Tam via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369196: [SemaDeclCXX] Allow inheriting constructor declaration to specify a cv… (authored by cpplearner, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D47419: [SemaDeclCXX] Allow inheriting constructor declaration that specify a cv-qualified type

2019-08-12 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. Herald added a project: clang. ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D47419/new/ https://reviews.llvm.org/D47419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-08-12 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-30 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. In D65050#1606022 , @aaron.ballman wrote: > The noexcept specifier is part of the type these days, is that also handled > properly? I believe that it's properly handled in this section of

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-29 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-23 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. In D65050#1596514 , @efriedma wrote: > Is this the only place where a compound type can contain a PackExpansionType? Yes AFAIK. No other place can contain a list or a pack expansion. The closest thing is dynamic exception

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-23 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 211358. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65050/new/ https://reviews.llvm.org/D65050 Files: clang/lib/AST/Type.cpp clang/test/SemaTemplate/alias-templates.cpp Index: clang/test/SemaTemplate/alias-templates.cpp

[PATCH] D65050: [SemaTemplate] Mark a function type as dependent when its parameter list contains pack expansion

2019-07-21 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added reviewers: doug.gregor, eli.friedman, lvoufo, rsmith. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Given `template using Int = int;`, the type `void(Int...)` should be treated as a dependent type, even though

[PATCH] D61027: Fix crash on switch conditions of non-integer types in templates

2019-04-24 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. (I am ensadc at bugzilla) Does this cause regression in the following case? template void f() { switch (N) case 0:; // should be diagnosed switch (0) case N:; // should be diagnosed } Currently clang diagnoses these `switch` statements even if the

[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

2019-03-20 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8166 +def err_multiple_likelihood : Error< + "there can only be one %0 attribue in any attribute list">; +def err_mutuably_exclusive_likelihood : Error< attribue =>

[PATCH] D57032: [SemaCXX] Param diagnostic matches overload logic

2019-01-22 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5092 // The parameter types are identical -if (Context.hasSameType(DefParamTy, DeclParamTy)) +if (Context.hasSameType(DefParamTy.getUnqualifiedType(), +

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-17 Thread S. B. Tam via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349444: [ExprConstant] Handle compound assignment when LHS has integral type and RHS… (authored by cpplearner, committed by ). Changed prior to commit:

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-14 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner marked 2 inline comments as done. cpplearner added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3453 Value) && handleFloatFloatBinOp(Info, E, Value, Opcode, RHS.getFloat()) &&

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-14 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 178242. cpplearner marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55413/new/ https://reviews.llvm.org/D55413 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index:

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-13 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner marked an inline comment as done. cpplearner added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3441 + Value); +} APSInt LHS = HandleIntToIntCast(Info, E, PromotedLHSType, rjmccall wrote: >

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-12 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner marked an inline comment as done. cpplearner added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3441 + Value); +} APSInt LHS = HandleIntToIntCast(Info, E, PromotedLHSType, rjmccall wrote: > Can

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 177719. cpplearner added a comment. Added parentheses. Restored the original tests and add more tests to the end of this function. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55413/new/ https://reviews.llvm.org/D55413

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner marked an inline comment as done. cpplearner added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx1y.cpp:343 if (a != 7) return false; -a *= 3; if (a != 21) return false; riccibruno wrote: > Why remove `a *= 3`

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-11 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 177708. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55413/new/ https://reviews.llvm.org/D55413 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index:

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-06 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Fixes PR39858 Repository: rC Clang https://reviews.llvm.org/D55413 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx1y.cpp Index:

[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

2018-05-30 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. Does `getAs()` work correctly with function returning `auto&`? Repository: rL LLVM https://reviews.llvm.org/D44480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D47419: [SemaDeclCXX] Allow inheriting constructor declaration that specify a cv-qualified type

2018-05-30 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:9690 + CanQualType CanonicalDesiredBase = DesiredBase->getCanonicalTypeUnqualified() +.getUnqualifiedType(); for (auto : Derived->bases()) { rsmith wrote: > How are we getting a

[PATCH] D47419: [SemaDeclCXX] Allow inheriting constructor declaration that specify a cv-qualified type

2018-05-27 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added a reviewer: rsmith. Herald added a subscriber: cfe-commits. This will allow the following code: struct base {}; using cbase = const base; struct inherit : cbase { using cbase::cbase; // previously error: 'cbase' (aka 'const base') is

[PATCH] D45403: Make [[maybe_unused]] work with static data members

2018-04-12 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. I do not have commit access. Could someone commit the change for me? https://reviews.llvm.org/D45403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45403: Make [[maybe_unused]] work with static data members

2018-04-10 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 141880. cpplearner added a comment. Removed `ExpectedForMaybeUnused` from AttributeList.h, and removed the entry for `ExpectedForMaybeUnused` from the `warn_attribute_wrong_decl_type` table definition. https://reviews.llvm.org/D45403 Files:

[PATCH] D45403: Make [[maybe_unused]] work with static data members

2018-04-10 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added a comment. In https://reviews.llvm.org/D45403#1062276, @aaron.ballman wrote: > I don't think we're currently diagnosing static data members of classes as > being unused in the first place; are there plans to implement that > functionality so that someone might want to write

[PATCH] D45403: Make [[maybe_unused]] work with static data members

2018-04-07 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner added inline comments. Comment at: test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p2.cpp:5 int I [[maybe_unused]]; - static int SI [[maybe_unused]]; // expected-warning {{'maybe_unused' attribute only applies to variables, functions, methods, types, enumerations,

[PATCH] D45403: Make [[maybe_unused]] work with static data members

2018-04-07 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added reviewers: aaron.ballman, rsmith. Herald added a subscriber: cfe-commits. IIUC a static data member is a variable, so [[maybe_unused]] should be allowed to apply to a static data member. Repository: rC Clang https://reviews.llvm.org/D45403

[PATCH] D27850: [libcxx] add missing constexpr to optional::value_or

2016-12-29 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 82653. cpplearner added a comment. backed out the changes to `` https://reviews.llvm.org/D27850 Files: include/optional test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp Index:

[PATCH] D27850: [libcxx] add missing constexpr to optional::value_or

2016-12-27 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 82551. https://reviews.llvm.org/D27850 Files: include/experimental/optional include/optional test/std/experimental/optional/optional.object/optional.object.observe/value_or.pass.cpp

[PATCH] D27850: [libcxx] add missing constexpr to optional::value_or

2016-12-27 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner updated this revision to Diff 82549. cpplearner added a comment. test updated https://reviews.llvm.org/D27850 Files: test/std/utilities/optional/optional.object/optional.object.observe/value_or.pass.cpp Index:

[PATCH] D27850: [libcxx] add missing constexpr to optional::value_or

2016-12-16 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner created this revision. cpplearner added reviewers: mclow.lists, EricWF, howard.hinnant. cpplearner added a subscriber: cfe-commits. See https://github.com/cplusplus/draft/pull/839 and https://github.com/cplusplus/fundamentals-ts/pull/73. https://reviews.llvm.org/D27850 Files: