llvm-project/lldb/source/Plugins/Language
Raphael Isemann 8340fbb9c7 [lldb] Reactivate Objective-C++ plugin
Summary:
Since commit 7b3ef05a37 the Objective-C++ plugin is dead code.
That commit added Objective-C++ to the list of languages for which `Language::LanguageIsCPlusPlus`
returns true. As the C++ language plugin also uses that method to figure out if it is responsible for a
given language, the C++ plugin since then also became the plugin that we found when looking for
a language plugin for Objective-C++. The only real fallout from that is that the source highlighting
for Objective-C++ files never worked as we always found the C++ plugin which refuses to highlight
files with Objective-C++ extensions.

This patch just adds a special exception for Objective-C++ to the list of languages that are governed
by the C++ plugin. Also adds a test that makes sure that we find the right plugin for all C language
types and that the highlighting for `.mm` (Objective-C++) and `.m` (Objective-C) files works.

I didn't revert 7b3ef05a37 as it does make sense to return
true for Objective-C++ from `Language::LanguageIsCPlusPlus` (e.g., we currently check if we care about
ODR violations by doing `if (Language::LanguageIsCPlusPlus(...))` and this should also work for
Objective-C++).

Fixes rdar://64420183

Reviewers: aprantl

Reviewed By: aprantl

Subscribers: mgorny, abidh, JDevlieghere

Differential Revision: https://reviews.llvm.org/D82109
2020-06-19 19:16:46 +02:00
..
CPlusPlus [lldb] Reactivate Objective-C++ plugin 2020-06-19 19:16:46 +02:00
ClangCommon Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
ObjC [lldb] Remove redundant access specifiers (NFC) 2020-06-15 21:34:13 -07:00
ObjCPlusPlus [lldb] Update header guards to be consistent and compliant with LLVM (NFC) 2020-02-17 23:15:40 -08:00
CMakeLists.txt Remove OCaml debugger plugin 2018-11-05 19:34:03 +00:00