summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/pluginhandler.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-04-09 11:57:14 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-04-09 18:07:03 +0200
commit28eb086f5d256a1febd7b0f38f9cd77fac574031 (patch)
treeca589dd445e9ffd8e5d3427e0bcc6da793ed1cd1 /compilerplugins/clang/pluginhandler.cxx
parentd214ab444e73490f4c95dffd7f376978cbcd3ccc (diff)
do not #error in clangplugins with --disable-pch
I missed that -building-pch-with-obj is checked by configure (and used) only if PCHs are used. So remove the error checking and hope that it gets checked whenever somebody does changes related to the flag. Change-Id: Ibdf991169f023dae48dad0dd2929215fb048d57d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113841 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins/clang/pluginhandler.cxx')
-rw-r--r--compilerplugins/clang/pluginhandler.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/compilerplugins/clang/pluginhandler.cxx b/compilerplugins/clang/pluginhandler.cxx
index 622caf917b8e..315062969b25 100644
--- a/compilerplugins/clang/pluginhandler.cxx
+++ b/compilerplugins/clang/pluginhandler.cxx
@@ -231,18 +231,18 @@ bool PluginHandler::ignoreLocation(SourceLocation loc) {
bool PluginHandler::checkIgnoreLocation(SourceLocation loc)
{
-#if HAVE_BUILDING_PCH_WITH_OBJ
- // If we're building a separate precompiled_foo.cxx file
- // for a PCH, then it is not necessary to check contents of everything
- // included by the PCH in every compilation, check only once for that
- // precompiled_foo.cxx file.
+#if CLANG_VERSION >= 80000
+ // If a location comes from a PCH, it is not necessary to check it
+ // in every compilation using the PCH, since with Clang we use
+ // -building-pch-with-obj to build a separate precompiled_foo.cxx file
+ // for the PCH, and so it is known that everything in the PCH will
+ // be checked while compiling this file. Skip the checks for all
+ // other files using the PCH.
if( !compiler.getSourceManager().isLocalSourceLocation( loc ))
{
if( !compiler.getLangOpts().BuildingPCHWithObjectFile )
return true;
}
-#elif CLANG_VERSION >= 110000
-#error Internal error, -building-pch-with-obj support not detected in Clang.
#endif
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( loc );
if( compiler.getSourceManager().isInSystemHeader( expansionLoc ))