summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-18 13:29:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-18 15:32:13 +0200
commit824d9394b529bb1fc521e4a4df8c4e3458ec5641 (patch)
tree349745820eec8e1d34b8e8cbbb2ff53442b0e7a5 /compilerplugins/clang
parent92bded1ca06df4a5f989040c2de825bb314db4a9 (diff)
Properly handle comma in CLANGFLAGS
...which would cause an error that STRINGIFY takes only a single argument. According to chris_wot on IRC, LLVM 6.0 on Ubuntu 18.04.3 LTS output of `llvm --cxxflags` (as is used in configure.ac to determine what ultimately ends up in CLANGFLAGS here) includes e.g. -Wl,--no-keep-files-mapped. Change-Id: Iff570840fe62c2aa2d972431e610a05fe2f6922c Reviewed-on: https://gerrit.libreoffice.org/81037 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/sharedvisitor/analyzer.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/compilerplugins/clang/sharedvisitor/analyzer.cxx b/compilerplugins/clang/sharedvisitor/analyzer.cxx
index 4d8e2b2bb763..d0f5d4e7a8a7 100644
--- a/compilerplugins/clang/sharedvisitor/analyzer.cxx
+++ b/compilerplugins/clang/sharedvisitor/analyzer.cxx
@@ -241,10 +241,8 @@ int main(int argc, char** argv)
}
args.push_back(argv[i] + prefixlen);
}
-#define STRINGIFY2(a) #a
-#define STRINGIFY(a) STRINGIFY2(a)
SmallVector< StringRef, 20 > clangflags;
- SplitString( STRINGIFY(CLANGFLAGS), clangflags );
+ SplitString( CLANGFLAGS, clangflags );
args.insert( args.end(), clangflags.begin(), clangflags.end());
args.insert(
args.end(),