[all-commits] [llvm/llvm-project] 9f3a3e: [lldb] Disable macro redefinition warnings in expr...
Raphael Isemann via All-commits
all-commits at lists.llvm.org
Tue Feb 14 14:21:36 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9f3a3e1f3f9767ae52c492d20d63f65e82319ed2
https://github.com/llvm/llvm-project/commit/9f3a3e1f3f9767ae52c492d20d63f65e82319ed2
Author: Raphael Isemann <teemperor at gmail.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
M lldb/test/API/commands/expression/macros/TestMacros.py
Log Message:
-----------
[lldb] Disable macro redefinition warnings in expression wrapper
GCC emits macro definitions into debug info when compiling with `-g3`. LLDB is
translating this information into `#define` directives which are injected into
the source code of user expressions. While this mechanism itself works fine,
it can lead to spurious "... macro redefined" warnings when the defined macro
is also a builtin Clang macro:
```
warning: <lldb wrapper prefix>:46:9: '__VERSION__' macro redefined
^
<built-in>:19:9: previous definition is here
[repeated about a 100 more times for every builtin macro]
```
This patch just disables the diagnostic when parsing LLDB's generated list of
macros definitions.
Reviewed By: Michael137
Differential Revision: https://reviews.llvm.org/D139740
More information about the All-commits
mailing list