Age | Commit message (Collapse) | Author |
|
Change-Id: I4d7b38c90d73a00f4dbc8ad7318fe4573328ed46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166503
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...as seen when building CompilerTest_compilerplugins_clang against recent LLVM
18 trunk libc++,
> [CPT] compilerplugins/clang/test/singlevalfields.cxx
> DesignatedInitExpr 0x1388bb790 'void' lvalue bitfield
> `-MemberExpr 0x1388bb760 'const __alignment':'const enum std::__format_spec::__alignment' lvalue bitfield ->__alignment_ 0x1401d5868
> `-CXXThisExpr 0x1388bb750 'const __parser<_CharT> *' implicit this
[...]
> error: 'expected-error' diagnostics seen but not expected:
> File /Users/stephan/llvm/inst/bin/../include/c++/v1/__format/parser_std_format_spec.h Line 499: oh dear, what can the matter be? [loplugin:singlevalfields]
[...]
Change-Id: I1cce598780bafc9306c9fbc42a1c98ff1f5450a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162075
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
> compilerplugins/clang/casttovoid.cxx:452:18: error: 'endswith' is deprecated: Use ends_with instead [-Werror,-Wdeprecated-declarations]
> .endswith(".h"));
> ^~~~~~~~
> ends_with
> ~/llvm/inst/include/llvm/ADT/StringRef.h:276:19: note: 'endswith' has been explicitly marked deprecated here
> [[nodiscard]] LLVM_DEPRECATED(
> ^
etc. after
<https://github.com/llvm/llvm-project/commit/5ac12951b4e9bbfcc5791282d0961ec2b65575e9>
"[ADT] Deprecate StringRef::{starts,ends}with (#75491)" on Clang 18 trunk, where
<https://github.com/llvm/llvm-project/commit/1b97645e56bf321b06d1353024339958b64fd242>
"[ADT] Introduce StringRef::{starts,ends}_width{,_insensitive}" had been added
towards Clang 16
Change-Id: Icb3e43b7d6be6f877815285913d846f766eddebf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
|
|
Change-Id: I7336003e038781d4ef50380fa49f66b5ff19379f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
> AtomicExpr 0xcb01120 'std::__detail::__platform_wait_t':'int'
> |-ImplicitCastExpr 0xcb01108 'std::__detail::__platform_wait_t *' <LValueToRValue>
> | `-MemberExpr 0xcb01048 'std::__detail::__platform_wait_t *' lvalue ->_M_addr 0xcafd9c8
> | `-CXXThisExpr 0xcb01038 '__waiter_base<_Tp> *' implicit this
> |-IntegerLiteral 0xcb01098 'int' 5
> `-IntegerLiteral 0xcb01078 'int' 1
> AtomicExpr 0xd1e2d08 'std::__detail::__platform_wait_t':'int'
> |-ImplicitCastExpr 0xd1e2cf0 'std::__detail::__platform_wait_t *' <LValueToRValue>
> | `-MemberExpr 0xd1e2cc0 'std::__detail::__platform_wait_t *' lvalue ->_M_addr 0xcb02bf8
> | `-CXXThisExpr 0xd1e2cb0 'struct std::__detail::__waiter_base<struct std::__detail::__waiter_pool> *' implicit this
> |-IntegerLiteral 0xcb01098 'int' 5
> `-IntegerLiteral 0xcb01078 'int' 1
> error: 'error' diagnostics seen but not expected:
> File ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/atomic_wait.h Line 312: oh dear, what can the matter be? [loplugin:singlevalfields]
> File ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/12.0.1/../../../../include/c++/12.0.1/bits/atomic_wait.h Line 312: oh dear, what can the matter be? [loplugin:singlevalfields]
Change-Id: I71c43b482aaa0992b7ce131d27e262b8e3b4087f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132160
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ic12cacb6e058a8725ea6d722399e3afe6ea458c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132115
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...as discussed in the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2020-November/086234.html>
"Bump --enable-compiler-plugins Clang baseline?" (and now picked up again at
<https://lists.freedesktop.org/archives/libreoffice/2022-February/088459.html>
"Re: Bump --enable-compiler-plugins Clang baseline?"), and clean up
compilerplugins/clang/ accordingly
Change-Id: I5e81c6fdcc363aeefd6227606225b526fdf7ac16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129989
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Rename it to FORCE_COMPILE and it takes the --enable-symbols
specification of what to include, for example
FORCE_COMPILE="all -sw/ -Library_sc".
Change-Id: I92afd8e0abc75d3566285c197d6640c26c03db36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122248
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
|
|
<https://github.com/llvm/llvm-project/commit/61cdaf66fe22be2b5942ddee4f46a998b4f3ee29>
"[ADT] Remove APInt/APSInt toString() std::string variants".
TODO: While most uses of compat::toString should be harmless performance-wise,
as they are either in error reporting code or in plugins that are not run by
default, some calls like the one in compilerplugins/clang/staticconstfield.cxx
might benefit from moving them away from using std::string.
Change-Id: Icfac7d6d4a0a4a4edeb5c8bdcdbc13b73e20a5e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117152
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I1257b7b865caa356c85eeeb45a19a537fc434ac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107368
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
trunk"
This reverts commit 09aa5a9be8b9b3c88cf25b85e0eda28c5ef19aa4, now that
<https://github.com/llvm/llvm-project/commit/
551092bc3dfb86f1e11a55f3bee0c8ee1be6fdd6> "Revert AST Matchers default to AsIs
mode" reverted the Clang commit that prompted this compilerplugins change.
Change-Id: I75c8b4cb2894cd67a791db460f2886a783856c73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100026
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...since <https://github.com/llvm/llvm-project/commit/
d0da5d2bbe8305d06dc01a98706fd73e11e24a9f> "Change default traversal in AST
Matchers to ignore invisible nodes". This caused failures
> [CPT] compilerplugins/clang/test/constparams.cxx
> ParmVarDecl 0x11d76c730 <compilerplugins/clang/test/constparams.cxx:15:12, col:18> col:18 used f1 'int *'
> DeclRefExpr 0x11d76c948 'int *' lvalue ParmVar 0x11d76c730 'f1' 'int *'
> ParmVarDecl 0x11d76cc80 <compilerplugins/clang/test/constparams.cxx:21:12, col:18> col:18 used f2 'int *'
> DeclRefExpr 0x11d76ce60 'int *' lvalue ParmVar 0x11d76cc80 'f2' 'int *'
> error: 'error' diagnostics expected but not seen:
> File compilerplugins/clang/test/constparams.cxx Line 15: this parameter can be const Class1::Class1 [loplugin:constparams]
> error: 'error' diagnostics seen but not expected:
> File compilerplugins/clang/test/constparams.cxx Line 15: no parent? [loplugin:constparams]
> File compilerplugins/clang/test/constparams.cxx Line 21: no parent? [loplugin:constparams]
> 3 errors generated.
[...]
> [CPT] compilerplugins/clang/test/unusedenumconstants.cxx
> error: 'error' diagnostics expected but not seen:
> File compilerplugins/clang/test/unusedenumconstants.cxx Line 30: read Bottom [loplugin:unusedenumconstants]
> error: 'error' diagnostics seen but not expected:
> File compilerplugins/clang/test/unusedenumconstants.cxx Line 30: write Bottom [loplugin:unusedenumconstants]
> 2 errors generated.
[...]
> [CPT] compilerplugins/clang/test/unusedfields.cxx
> error: 'error' diagnostics expected but not seen:
> File compilerplugins/clang/test/unusedfields.cxx Line 156 (directive at compilerplugins/clang/test/unusedfields.cxx:164): write m_f5 [loplugin:unusedfields]
> File compilerplugins/clang/test/unusedfields.cxx Line 210 (directive at compilerplugins/clang/test/unusedfields.cxx:211): read m_f1 [loplugin:unusedfields]
> 2 errors generated.
For compilerplugins/clang/test/constparams.cxx at least it would have worked to
fix that locally with
> diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
> index 95c8184009d7..70f056fa5a69 100644
> --- a/compilerplugins/clang/constparams.cxx
> +++ b/compilerplugins/clang/constparams.cxx
> @@ -274,7 +274,7 @@ bool ConstParams::checkIfCanBeConst(const Stmt* stmt, const ParmVarDecl* parmVar
> {
> for ( auto cxxCtorInitializer : cxxConstructorDecl->inits())
> {
> - if ( cxxCtorInitializer->getInit() == stmt)
> + if ( cxxCtorInitializer->getInit()->IgnoreImpCasts() == stmt)
> {
> if (cxxCtorInitializer->isAnyMemberInitializer())
> {
(somewhat unintuitively, given the Clang change is apparently about ignoring
more implicit nodes), but overall it appears better---at least for now---to use
a getParents variant that keeps the old traversal behavior.
For that, instead of using the clang::ASTContext::ParentMapCtx, we create our
own loplugin::Plugin::parentMapContext_. There appear to be no uses of
ASTContext::getParent across the Clang codebase itself, outside of ASTMatcher
code, so it looks unlikely that creating our own ParentMapContext instance would
degrade performance by no longer sharing cached data between Clang's internals
and our plugin. (And given that ASTContext::getParents is deprecated with the
note "New callers should use ParentMapContext::getParents() directly", this may
well be the correct way in the long run, anyway.)
Change-Id: I46c7912f2737e7c224fd45ab41441f69e2f10bd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94795
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|