[PATCH] D129048: Rewording the "static_assert" to static assertion

2022-07-21 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D129048#3669568 , @aaron.ballman wrote: > In D129048#3669069 , @Mordante > wrote: > >> In D129048#3668905 , >> @aaron.ballman wrote: >> >>>

[PATCH] D130419: Use `` with MSVC and C++

2022-07-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Can you add a dummy file in the libc++ subdirectory? That should trigger the libc++ pre-commit CI. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130419/new/ https://reviews.llvm.org/D130419 __

[PATCH] D129048: Rewording the "static_assert" to static assertion

2022-07-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision. Mordante added a comment. This revision is now accepted and ready to land. In D129048#3674500 , @Codesbyusman wrote: > updated the libcxx all files FYI for libcxx you can ignore the red format CI step. So the libcxx buil

[PATCH] D130419: Use `` with MSVC and C++

2022-07-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision. Mordante added a comment. This revision is now accepted and ready to land. In D130419#3676654 , @aaron.ballman wrote: > In D130419#3676643 , @fsb4000 wrote: > >> drop the dummy fi

[PATCH] D130419: Use `` with MSVC and C++

2022-07-25 Thread Mark de Wever via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGba49d39b20cc: Use `` with MSVC and C++ (authored by fsb4000, committed by Mordante). Changed prior to commit: https://reviews.llvm.or

[PATCH] D66067: Push lambda scope earlier when transforming lambda expression

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/test/SemaTemplate/default-arguments-cxx0x.cpp:1 -// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s +// RUN: %clang_cc1 -fsyntax-only -std=c++14 -verify %s // expected-no-diagnostics comex wrote: > Mordante w

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: gribozavr, davezarzycki. Mordante added a project: clang. Based on @davezarzycki remarks in D64696 improved the wording of the warning message. (Note I don't have commit access) Repository: rG LLVM Gi

[PATCH] D64696: Adds a warning when an inline Doxygen comment has no argument

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I created D66700 with an improved warning message. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64696/new/ https://reviews.llvm.org/D64696 ___ cfe-commits

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added a reviewer: gribozavr. Mordante added a project: clang. The assertion happens when compiling with -Wdocumentation with variable declaration to a typedefed function pointer. I not too familiar with the ObjC syntax but first two tests assert without t

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. You're welcome @davezarzycki. Can one of you commit the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66700/new/ https://reviews.llvm.org/D66700 ___ cfe-commits mailing

[PATCH] D66700: [Wdocumentation] improve wording of a warning message

2019-08-24 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66700/new/ https://reviews.llvm.org/D66700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-08-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/lib/AST/Comment.cpp:151 +static bool getFunctionTypeLoc(TypeLoc TL, FunctionTypeLoc &ResFTL, + bool testTypedefTypeLoc = false) { TypeLoc PrevTL;

[PATCH] D66722: [clang] Ensure that comment classes are trivially destructible

2019-08-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a reviewer: gribozavr. Mordante added a subscriber: gribozavr. Mordante added a comment. Please also add a test for the `DeclInfo` struct. It isn't a `CommentNode` but also allocated with the `BumpPtrAllocator`. I also like @gribozavr's input. Repository: rC Clang CHANGES SINC

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-08-30 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added inline comments. Comment at: clang/lib/AST/Comment.cpp:151 +static bool getFunctionTypeLoc(TypeLoc TL, FunctionTypeLoc &ResFTL, + bool testTypedefTypeLoc = false) { TypeLoc PrevTL;

[PATCH] D64820: [Sema] Avoids an assertion failure when an invalid conversion declaration is used

2019-08-31 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218213. Mordante added a comment. Addresses the review remarks: - Moved the unit test to SemaCXX (also use the PR as name of the file) - Change the unit test to use `-verify` instead of `FileCheck` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D6482

[PATCH] D64874: [Sema] Improve handling of function pointer conversions

2019-08-31 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218215. Mordante added a comment. Addresses the review remarks: - resultTy -> ResultTy - Move all unit tests in one file - Change the unit test to use `-verify` instead of `FileCheck` - Use PR40024 instead of link to Bugzilla CHANGES SINCE LAST ACTION ht

[PATCH] D65695: Implements CWG 1601 in [over.ics.rank/4.2]

2019-08-31 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218216. Mordante added a comment. Addresses the review remarks: - Use `S.Context.hasSameType` for the comparision - Simplify an `if` statement CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65695/new/ https://reviews.llvm.org/D65695 Files: clang

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-08-31 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218221. Mordante retitled this revision from "Fixes an assertion failure while instantiation a template with an incomplete typo corrected type" to "[Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type". Mor

[PATCH] D65694: Properly instantiate a decltype in argument's default initializer

2019-09-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218256. Mordante added a comment. Changed the approach to use `addInstantiatedParametersToScope` as suggested by @rsmith. Since the function was `static` in another file I made it a member of `LocalInstantiationScope` and adjusted all callers. Minor change

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-09-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218264. Mordante marked an inline comment as done. Mordante added a comment. As discussed on IRC no longer allow `\return` on a `typedef`'ed type. This is consistent with `\param`. - Reverts all prior changes in `lib/AST/Comment.cpp` - Adds extra tests in `

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218377. Mordante added a comment. Adds extra unit tests for references. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66706/new/ https://reviews.llvm.org/D66706 Files: clang/lib/AST/CommentSema.cpp clang/test/Sema/warn-documentation.cpp clan

[PATCH] D66706: [Wdocumentation] fixes an assertion failure with typedefed function and block pointer

2019-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks for the review. using D = void(); D &d = ...; ///< \return none Is no issue, I added tests for it. Can you commit the code for me? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66706/new/ https://reviews.llvm.org/D66706

[PATCH] D67052: Add reference type transformation builtins

2019-09-03 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1095 + default: +assert(false && "Not a reference type specifier"); + } Wouldn't it be better to use `llvm_unreachable("Not a reference type specifier");` Maybe also move this lin

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-09-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added inline comments. Comment at: clang/test/SemaTemplate/instantiate-incomplete-typo-suggested-error-limit.cpp:1 +// RUN: not %clang -fsyntax-only -std=c++11 -ferror-limit=1 %s 2>&1 | FileCheck %s + aaron.ba

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-09-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 218965. Mordante marked an inline comment as done. Mordante added a comment. Removes the unnecessary std::move as suggested by @aaron.ballman. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64644/new/ https://reviews.llvm.org/D64644 Files: clang/

[PATCH] D64644: [Sema] Fixes an assertion failure while instantiation a template with an incomplete typo corrected type

2019-09-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Thanks for the review. Could you commit this patch? I don't have commit access. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64644/new/ https://reviews.llvm.org/D64644 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D71920: [AST] Refactor propagation of dependency bits. NFC

2019-12-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I like the goal of this patch and the simplifications it does. I don't feel qualified to do a full review. Comment at: clang/include/clang/AST/Expr.h:126 +if (TD) + D = D | DependencyFlags::Type; +if (VD) Just curious why

[PATCH] D71966: [Wdocumentation][RFC] Improve identifier's of \param

2019-12-28 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. The merge bot noticed I forgot to update clang's unittests. Will look at that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71966/new/ https://reviews.llvm.org/D71966 ___ cfe

[PATCH] D72052: [UserManual] Update the C++ standard support

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added a reviewer: rsmith. Mordante added a project: clang. This brings the state in sync with http://clang.llvm.org/cxx_status.html. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72052 Files: clang/docs/UsersManual.rst Index: clang

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 235763. Mordante retitled this revision from "Fixes -Wrange-loop-analysis warnings" to "[NFC] Fixes -Wrange-loop-analysis warnings". Mordante added a comment. Reviewed the types and added a `*` for pointers and added a `const` when applicable. CHANGES SIN

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 8 inline comments as done. Mordante added inline comments. Comment at: lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp:22 #include "lldb/Target/Process.h" #include "lldb/Utility/Log.h" xbolva0

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added a comment. Thanks for the review! I'll commit all the -Wrange-loop-analysis patches later today. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71857/new/ https://reviews.llvm.org/D71857 ___

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added a project: clang. Herald added a subscriber: mgorny. This is a proof-of-concept patch to be discussed on the dev ml. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72053 Files: clang/docs/ImplementationQuantities.rst clang/doc

[PATCH] D71806: Improve Wrange-loop-analyses for rvalue reference

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe5ab1e49f958: Improve Wrange-loop-analyses for rvalue reference (authored by Mordante). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71806/new/ https://rev

[PATCH] D68913: Adds fixit hints to the Wrange-loop-analysis

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf022a5a792fd: Adds fixit hints to the -Wrange-loop-analysis (authored by Mordante). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68913/new/ https://reviews

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8dc7b982b455: [NFC] Fixes -Wrange-loop-analysis warnings (authored by Mordante). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71857/new/ https://reviews.ll

[PATCH] D68912: Adds -Wrange-loop-analysis to -Wall

2020-01-01 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd8117542ac57: Adds -Wrange-loop-analysis to -Wall (authored by Mordante). Changed prior to commit: https://reviews.llvm.org/D68912?vs=226539&id=235783#toc Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D71857#1800663 , @MaskRay wrote: > However, I am afraid I don't like some of the fixes here. You can replace > `const auto` with `const auto &` and call that a fix... IMHO if the type is > not obvious, `const ConcreteType &`

[PATCH] D72103: [Sema] Avoid using an invalid InsertPos

2020-01-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: lvoufo, rsmith. Mordante added a project: clang. The function `Sema::CheckVarTemplateId` tries to find a template specialization. If that fails it gets an `InsertPos` where the specialization should be added in a `FoldingSet`. Then it tri

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 236190. Mordante added a comment. Added support for some additional features: - Allow limits from the C standard, either sharing the C++ constants or separately. - Allow to document the design choices for the limit. - Allow to track the status of the limit.

[PATCH] D71857: [NFC] Fixes -Wrange-loop-analysis warnings

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D71857#1800663 , @MaskRay wrote: > I think there is a false positive. > > https://github.com/llvm/llvm-project/tree/master/lld/ELF/Relocations.cpp#L1622 > > for (const std::pair ts : isd->thunkSections) > Removing the `c

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: aaron.ballman, xbolva00, MaskRay. Mordante added a project: clang. No longer generate a diagnostic when a small trivially copyable type is used without a reference. Before the test looked for a POD type and had no size restriction. Since

[PATCH] D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I like this change, but I don't feel qualified to fully review the patch. I wonder what happens if the project already contains a suggested fix, for example: #define __FOO(X) ... #define _FOO(X) __FOO(X) #define FOO(X) _FOO(X) will it suggest: #define FOO(X)

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:2806 - // constructors. - if (VariableType.isPODType(SemaRef.Context)) return; xbolva00 wrote: > assert it? Sorry I don't understand what you

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/docs/ImplementationQuantities.rst:70 + +These limits are defined in the standards, but are imposed in Clang. + craig.topper wrote: > should this say ‘not defined’? Yes, t

[PATCH] D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names

2020-01-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a subscriber: eugene. Mordante added a comment. @eugene `Please don't use auto when type is spelled in same statement or iterator.` do you mean `type is not spelled` ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72213/new/ https:/

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:2806 - // constructors. - if (VariableType.isPODType(SemaRef.Context)) return; xbolva00 wrote: > Mordante wrote: > > xbolva00 wrote: > > > as

[PATCH] D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names

2020-01-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp:70 + const bool IsInGlobalNamespace) { + return IsInGlobalNamespace && Name.size() > 1 && Name[0] == '_'; +} logan-

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Nice to see this patch! I intended to look at a similar patch, but that's no longer required. One question does it also handle cases like `std::vector PtrPtrVec;` properly? Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-qualifie

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 236248. Mordante marked an inline comment as done. Mordante added a comment. Made some improvements based on feedback of @craig.topper: - Adds a not - Implements an example of the maximum string length when using -Wpedantic CHANGES SINCE LAST ACTION http

[PATCH] D72231: [Sema] Adds the pointer-to-int-cast diagnostic

2020-01-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: dblaikie, rsmith. Mordante added a project: clang. Converting a pointer to an integer whose result cannot represented in the integer type is undefined behavior is C and prohibited in C++. C++ already has a diagnostic when casting. This ad

[PATCH] D72231: [Sema] Adds the pointer-to-int-cast diagnostic

2020-01-05 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D72231#1804929 , @xbolva00 wrote: > >> The diagnostic is not enabled by default > > But GCC enables it for C even without "-Wall or -Wextra". Clang should follow > it.. I'll have a look what the impact is. When I tested it a

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/docs/ImplementationQuantities.rst:11 +This page lists the limits implemented in the Clang compiler. The available +resources on the system running Clang may imposse other limits. For exam

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 6 inline comments as done. Mordante added a comment. Thanks for the feedback! Comment at: clang/include/clang/AST/Decl.h:903 /// declared. -unsigned ScopeDepthOrObjCQuals : NumScopeDepthOrObjCQualsBits; +unsigned ScopeDepthOrObjCQuals : IQ::NumScope

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done. Mordante added a comment. You're welcome. It would be nice if we can get this one in the release. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72212/new/ https://reviews.llvm.org/D72212 ___

[PATCH] D72231: [Sema] Adds the pointer-to-int-cast diagnostic

2020-01-07 Thread Mark de Wever via Phabricator via cfe-commits
Mordante planned changes to this revision. Mordante added a comment. While looking at the test failures I noticed the tests `pointer_to_integral_type_conv` in `clang/test/Sema/MicrosoftExtensions.c` were not tested. Will look into it later. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 8 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:2812-2813 - // TODO: Determine a maximum size that a POD type can be before a diagnostic - // should be emitted. Also, only ignore POD types with trivial copy -

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Mordante marked 3 inline comments as done. Closed by commit rG9c74fb402e1b: [Sema] Improve -Wrange-loop-analysis warnings. (authored by Mordante). Changed prior to commit: https://reviews.llvm.org/D72212?vs=236199&id=2374

[PATCH] D72378: [clang-tidy] Add `bugprone-reserved-identifier`

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Adding `Depends on D72284` would add the patches to the stack. I like the patch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72378/new/ https://reviews.llvm.org/D72378 ___

[PATCH] D72052: [UserManual] Update the C++ standard support

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Friendly ping, it would be nice to get this in the next release. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72052/new/ https://reviews.llvm.org/D72052 ___ cfe-commits maili

[PATCH] D72553: [clang-tidy] Add llvm-prefer-preincrement check

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. I only have some naming nits - incriment -> increment - decriment -> decrement Maybe rename the check llvm-prefer-preincrement -> llvm-prefer-pre-increment and rename the files and classes PreferPreincrementCheck -> PreferPreIncrementCheck Comment a

[PATCH] D72553: [clang-tidy] Add llvm-prefer-preincrement check

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D72553#1815558 , @njames93 wrote: > - 99% sure I have all incriments renamed now I checked and can't find them anymore, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72

[PATCH] D72052: [UserManual] Update the C++ standard support

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/docs/UsersManual.rst:2557 clang fully implements all of standard C++98 except for exported +templates (which were removed in C++11), and all of standards C++11, C++14,

[PATCH] D72560: Add -Wrange-loop-analysis changes to ReleaseNotes

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: aaron.ballman, xbolva00. Mordante added a project: clang. This reflects the recent changes done. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72560 Files: clang/docs/ReleaseNotes.rst Index: clang/docs/ReleaseNotes

[PATCH] D72560: Add -Wrange-loop-analysis changes to ReleaseNotes

2020-01-11 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72560/new/ https://reviews.llvm.org/D72560 ___ cfe-commits mail

[PATCH] D72560: Add -Wrange-loop-analysis changes to ReleaseNotes

2020-01-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante closed this revision. Mordante added a comment. Committed as https://reviews.llvm.org/rGdc422e968e73790178e500f506e8fb7cfa1e62ea I accidentally forgot to add the revision id. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72560/new/ https:

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: lvoufo, rsmith. Mordante added a project: clang. Mordante requested review of this revision. The function `TryListConversion` didn't properly validate the following part of the standard: Otherwise, if the parameter type is a character a

[PATCH] D87563: [Sema] Improve overload resolution

2020-09-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: lvoufo, rsmith. Mordante added a project: clang. Mordante requested review of this revision. The overload resolution for initializer lists was incomplete. It did not properly take the number of elements in the target array into account. Th

[PATCH] D87565: [Sema] Improve const_cast conformance to N4261

2020-09-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: rjmccall, rsmith. Mordante added a project: clang. Mordante requested review of this revision. Allows `const_cast`s of similar non-record types. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87565 Files: clang/lib/Se

[PATCH] D87566: [Sema] Permit conversions to arrays of unknown bound

2020-09-12 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: lvoufo, rsmith. Mordante added a project: clang. Mordante requested review of this revision. This implements C++20's P0388. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87566 Files: clang/lib/AST/ASTContext.cpp cl

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added a comment. Thanks for the feedback! Comment at: clang/lib/Sema/SemaOverload.cpp:4988 + +if (ToType->isArrayType() && ToType->isCharType() && +isa(From->getInit(0))) { rsmith wrote: > `isCharT

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-15 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:4989 +if (ToType->isArrayType() && ToType->isCharType() && +isa(From->getInit(0))) { InitializedEntity Entity = rsmith wrote:

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-19 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414 + void f(const char[4]); + void f(const wchar_t[4]); + void f(const char16_t[4]); + void f(const char32_t[4]); rsmith wrote: > These should presumably be references to arrays, r

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-09-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Friendly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86559/new/ https://reviews.llvm.org/D86559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D88363: [CodeGen] Improve likelihood attribute branch weights

2020-09-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: rsmith, aaron.ballman. Mordante added a project: clang. Mordante requested review of this revision. Bruno De Fraine discovered some issues with D85091 . The branch weights generated for `logical not` and `

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414 + void f(const char[4]); + void f(const wchar_t[4]); + void f(const char16_t[4]); + void f(const char32_t[4]); rsmith wrote: > rsmith

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 294556. Mordante added a comment. Addresses the review comments. Adds an extra test case to test whether the proper overload is called. The proper overload is a bit of a surprise so when the expected behaviour changes the overload test can be adjusted. CH

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-09-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6454 +static bool validateLikelihoodAttr(Sema &S, Decl *D, const ParsedAttr &A) { + if (!isa(D)) { aaron.ballman wrote: > This is entering into somewhat novel territory for attributes,

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-23 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 8 inline comments as done. Mordante added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1288 +def Likely : StmtAttr { + let Spellings = [CXX11<"", "likely", 201803>]; + let Documentation = [LikelihoodDocs]; aaron.ballman wrote:

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-23 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 287264. Mordante marked 2 inline comments as done. Mordante added a comment. Addresses review comments: - Adds support for c2x using `[[clang::likely]]` and `[[clang::unlikely]]` - Remove warnings about conflicting likelihoods, except those required by the

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante created this revision. Mordante added reviewers: rsmith, rjmccall, aaron.ballman. Mordante added a project: clang. Herald added a subscriber: cfe-commits. Mordante requested review of this revision. Allows the likelihood attributes on label, which are not part of a case statement. When a

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-25 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D86559#2236931 , @Quuxplusone wrote: > It seems like this patch would basically "copy" the `[[likely]]` attribute > from line C up to lines A and B, where it would reinforce the likelihood of > path A and (maybe?) "cancel out

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 4 inline comments as done. Mordante added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:1726 + } + }]; +} aaron.ballman wrote: > Something else we should document is what our behavior is when the attribute > is not immediat

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-26 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D86559#2239013 , @aaron.ballman wrote: > I'd like to understand your reasoning for ignore + diagnose as opposed to > count attrs (+ optionally diagnose) or other strategies. I can see pros and > cons to basically anything we

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante planned changes to this revision. Mordante marked 15 inline comments as done. Mordante added a comment. I fixed the issues locally. Before I resubmit them I'd rather discuss in D86559 the direction we want to take, so we can avoid an additional review c

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-27 Thread Mark de Wever via Phabricator via cfe-commits
Mordante planned changes to this revision. Mordante added a comment. > That is exactly the behavior I am coming to believe we should follow. You can > either write it on a compound statement that is guarded by a flow control > decision (`if`/`else`/`while`) or you can write it on a label, otherw

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 7 inline comments as done. Mordante added inline comments. Herald added a subscriber: danielkiss. Comment at: clang/include/clang/Basic/Attr.td:1288 +def Likely : StmtAttr { + let Spellings = [CXX11<"", "likely", 201803>]; + let Documentation = [LikelihoodDocs];

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. Herald added a subscriber: danielkiss. In D86559#2242713 , @aaron.ballman wrote: > In D86559#2242586 , @Mordante wrote: > >>> That is exactly the behavior I am coming to believe we should

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D86559#2243575 , @staffantj wrote: > As one of the SG14 industry members driving this, I'm firmly in the camp that > this is what we're expecting. In the first case the 1/2 case are "neutral". > This is a very explicit, and l

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-08-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D86559#2243583 , @staffantj wrote: > The use case for this becomes clearer when considering that the attribute > that will be used 95% of the time is [[unlikely]]. You may have a constructor > that you wish to ask the compile

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-29 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 288781. Mordante marked an inline comment as done. Mordante added a comment. Reworked the patch to match the behaviour as discussed in D86559 . - The likelihood attributes only have an effect when used directly on the ThenS

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 8 inline comments as done. Mordante added a comment. Thanks again for your feedback. Once we agree on what to do with the Likelihood state in the output I'll finish the changes and submit a new patch. Comment at: clang/include/clang/Basic/AttrDocs.td:1697 +It i

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-09-01 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added a comment. In D86559#2250106 , @staffantj wrote: > In D86559#2250034 , @aaron.ballman > wrote: > >> In D86559#2243575 , @staffantj >> wrote: >> >>> This is n

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 8 inline comments as done. Mordante added a comment. In D85091#2250657 , @rsmith wrote: > Looking specifically for attributes in the 'then' and 'else' cases of an `if` > seems like a fine first pass at this, but I think this is the wrong w

[PATCH] D82994: [RFC] Instrumenting Clang/LLVM with Perfetto

2020-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:244 VALUE_CODEGENOPT(TimeTraceGranularity, 32, 500) ///< Minimum time granularity (in microseconds), +CODEGENOPT(Perfetto , 1, 0) ///< Set when -perfetto is enabled.

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-02 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:578 +static std::pair +getLikelihood(const Stmt *Stmt) { + if (const auto *AS = dyn_cast(Stmt)) rsmith wrote: > Mordante wrote: > > aaron.ballman w

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:578 +static std::pair +getLikelihood(const Stmt *Stmt) { + if (const auto *AS = dyn_cast(Stmt)) aaron.ballman wrote: > Mordante wrote: > > rsmith w

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-04 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 289979. Mordante marked an inline comment as done. Mordante added a comment. Addresses review comments, mainly: - Improving the documentation - Removing the AST bits since they're no longer required CHANGES SINCE LAST ACTION https://reviews.llvm.org/D850

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done. Mordante added a comment. Thanks for your feedback during the review. Comment at: clang/include/clang/AST/Stmt.h:1180 + + /// \returns the likelihood of the branches of an if statement. + static Likelihood getLikelihood(const Stmt *T

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/include/clang/AST/Stmt.h:1180 + + /// \returns the likelihood of the branches of an if statement. + static Likelihood getLikelihood(const Stmt *Then, const Stmt *Else);

<    1   2   3   4   5   >