This patch provides support for DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 tags in clang C++ frontend.
Details
- Reviewers
aprantl dblaikie - Commits
- rG350de4f05d8f: Support for DWARF-5 C++ language tags.
rL372681: Support for DWARF-5 C++ language tags.
rC372681: Support for DWARF-5 C++ language tags.
rGbf9c8ffb5494: Support for DWARF-5 C++ language tags.
rC372663: Support for DWARF-5 C++ language tags.
rL372663: Support for DWARF-5 C++ language tags.
Diff Detail
Event Timeline
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 | I understand that DWARF does not define a C++17 language constant, but in the AST I fell like we should represent it, even if it is being lowered into C++14 for the debug info. | |
lib/AST/DeclPrinter.cpp | ||
1009 | Can you turn this into a switch() statement? | |
1010 | Why this weird spelling with the underscore? |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 | Since these are the DWARF DW_lang constants, we shouldn't repeat their numeric values here. Can we write this as |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 | We can do this, but not sure whether, we should do this in AST ? |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 | I'm not sure I understand the concern here. Are you worried about #Including "llvm/BinaryFormat/DWARF.h" and making these definitions visible to users of DeclCXX.h? All symbols there are in a separate namespace. |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 | Thanks @aprantl for your review. |
@aprantl , Could you commit these changes, I don't have commit access rights.
Thanks!
/srv/llvm-buildbot-srcatch/llvm-build-dir/clang-x86_64-debian-fast/llvm.src/tools/clang/tools/extra/modularize/Modularize.cpp:583:13: warning: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Wswitch]
1 warning generated.
I reverted this in r372672 because it caused a test failure in LLDB: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/1748/
We also get that warning when compiling with clang 8:
../../clang-tools-extra/modularize/Modularize.cpp:583:13: error: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Werror,-Wswitch] switch (D->getLanguage()) { ^ 1 error generated.
I did something about it in r372714. Please take a look and see if it should be fixed differently.
Hi Thanks for doing this, I got occupied by something else. that seems good.
Thanks again!
I understand that DWARF does not define a C++17 language constant, but in the AST I fell like we should represent it, even if it is being lowered into C++14 for the debug info.