[PATCH] D100057: Remove warning "suggest braces" for aggregate initialization of an empty class with an aggregate base class.

2021-04-07 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:1013 - auto *ParentRD = - Entity.getParent()->getType()->castAs()->getDecl(); - if (CXXRecordDecl *CXXRD = dyn_cast(ParentRD)) -if (CXXRD->getNumBases()) - return false; + // Allows elide bra

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-12-03 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. As someone who has extensivly worked with conscepts I cannot stress how much this would improve my live CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 ___ cfe-commits mailing

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-25 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2296 + +void UnwrappedLineParser::parseRequiresExpression(int OriginalLevel) { + // requires (R range) Line->Level is an unsigned int so this gives me a warning. I guess it should

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. It seems the spacing of the binary operator is not yet stable. This test is breaking for me: verifyFormat("template \nconcept someConcept = Constraint1 && Constraint2;"); CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D7977

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-20 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. Question: Should I add my wip work as a child revision or what would you suggest CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79773/new/ https://reviews.llvm.org/D79773 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2314 + nextToken(); + if (FormatTok->Tok.is(tok::less)) { +while (!FormatTok->Tok.is(tok::greater)) { miscco wrote: > I guess you could use `parseBracedList(/*Con

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2314 + nextToken(); + if (FormatTok->Tok.is(tok::less)) { +while (!FormatTok->Tok.is(tok::greater)) { I guess you could use `parseBracedList(/*ContinueOnSemicolon

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:2281 + if (FormatTok->Tok.is(tok::kw_requires)) +parseRequires(); +} I believe this should be `parseConstraintExpression` because that is the term of art in the standard. T

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. You are missing to check the boolean in `CHECK_PARSE_BOOL` in FormatTest.cpp Comment at: clang/lib/Format/TokenAnnotator.cpp:1566 Current.Type = TT_TrailingReturnArrow; - +} else if (Current.is(tok::arrow) && Current.Previous && +

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3499 return true; if (Right.Previous->ClosesTemplateDeclaration && Right.Previous->MatchingParen && I think that your change should actually come in here where we determi

[PATCH] D79773: [clang-format] Improve clang-formats handling of concepts

2020-05-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. Awesome, Thank you very much, I dragged my feet on starting to implement something for real. As a high level comment I think we need to handle requires expressions to get this correct, as `requires requires` would otherwise to bad things. From my early brainstorming i g

[PATCH] D67052: Add reference type transformation builtins

2020-04-17 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:416 static bool isTypeRep(TST T) { -return (T == TST_typename || T == TST_typeofType || -T == TST_underlyingType || T == TST_atomic); +return (TST_typename <= T <= TST_atomic);

[PATCH] D73138: [libcxx] [test] Correct asserted type in subspan test; subspan with count should never produce dynamic_extent

2020-02-19 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. Ah sorry about that, I overlooked that we had special cased tests without count. Thanks Billy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73138/new/ https://reviews.llvm.org/D73138 _

[PATCH] D69520: [libc++] Disallow dynamic -> static span conversions

2020-02-16 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added a comment. I believe this is superseded by the implementation of P1976R2 in D74577 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69520/new/ https://reviews.llvm.org/D69520 ___ cfe-commits mail

[PATCH] D67052: Add reference type transformation builtins

2020-02-11 Thread Michael Schellenberger Costa via Phabricator via cfe-commits
miscco added subscribers: cjdb, miscco. miscco added a comment. Some nits, looks great, especially for library concepts. Pinging @cjdb Comment at: clang/lib/AST/TypePrinter.cpp:1020 switch (T->getUTTKind()) { case UnaryTransformType::EnumUnderlyingType: --