llvm-project/clang/tools/libclang
Aaron Ballman 60727d8569 [C2x] implement typeof and typeof_unqual
This implements WG14 N2927 and WG14 N2930, which together define the
feature for typeof and typeof_unqual, which get the type of their
argument as either fully qualified or fully unqualified. The argument
to either operator is either a type name or an expression. If given a
type name, the type information is pulled directly from the given name.
If given an expression, the type information is pulled from the
expression. Recursive use of these operators is allowed and has the
expected behavior (the innermost operator is resolved to a type, and
that's used to resolve the next layer of typeof specifier, until a
fully resolved type is determined.

Note, we already supported typeof in GNU mode as a non-conforming
extension and we are *not* exposing typeof_unqual as a non-conforming
extension in that mode, nor are we exposing typeof or typeof_unqual as
a nonconforming extension in other language modes. The GNU variant of
typeof supports a form where the parentheses are elided from the
operator when given an expression (e.g., typeof 0 i = 12;). When in C2x
mode, we do not support this extension.

Differential Revision: https://reviews.llvm.org/D134286
2022-09-28 13:27:52 -04:00
..
ARCMigrate.cpp
BuildSystem.cpp [llvm] Cleanup header dependencies in ADT and Support 2022-01-21 13:54:49 +01:00
CIndex.cpp [C2x] implement typeof and typeof_unqual 2022-09-28 13:27:52 -04:00
CIndexCXX.cpp
CIndexCodeCompletion.cpp [CodeCompletion] Signature help for braced constructor calls 2022-01-03 20:14:59 +01:00
CIndexDiagnostic.cpp
CIndexDiagnostic.h
CIndexHigh.cpp [clang] Use llvm::is_contained (NFC) 2021-10-13 20:41:55 -07:00
CIndexInclusionStack.cpp SourceManager: Clarify that FileInfo always has a ContentCache, NFC 2020-10-23 12:38:53 -04:00
CIndexUSRs.cpp
CIndexer.cpp Use static_cast from SmallString to std::string (NFC) 2022-06-04 22:09:27 -07:00
CIndexer.h
CLog.h
CMakeLists.txt [NFC] Fix a misleading comment CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION 2022-08-25 09:56:55 +02:00
CXComment.cpp
CXComment.h
CXCompilationDatabase.cpp
CXCursor.cpp Allow getting template args for ClassTemplateSpecializations 2022-09-23 11:06:14 -04:00
CXCursor.h
CXIndexDataConsumer.cpp [libclang] add supporting for indexing/visiting C++ concepts 2022-05-24 10:02:53 -07:00
CXIndexDataConsumer.h [libclang] add supporting for indexing/visiting C++ concepts 2022-05-24 10:02:53 -07:00
CXLoadedDiagnostic.cpp [clang] Remove redundant member initialization (NFC) 2022-01-02 10:20:23 -08:00
CXLoadedDiagnostic.h
CXSourceLocation.cpp
CXSourceLocation.h [libclang] Fix error handler in translateSourceLocation. 2021-06-18 13:43:14 +01:00
CXStoredDiagnostic.cpp
CXString.cpp [libclang] Fix conversion from `StringRef` to `CXString` 2022-08-31 17:39:45 +01:00
CXString.h
CXTranslationUnit.h
CXType.cpp Expose QualType::getNonReferenceType in libclang 2022-09-02 09:54:10 -04:00
CXType.h [clang] Remove unused forward declarations (NFC) 2022-01-09 12:21:00 -08:00
CursorVisitor.h [libclang] add supporting for indexing/visiting C++ concepts 2022-05-24 10:02:53 -07:00
FatalErrorHandler.cpp [clang] FatalErrorHandler.cpp - add explicit <stdio.h> include 2021-10-05 17:03:17 +01:00
Index_Internal.h
Indexing.cpp [Frontend] Flip default of CreateInvocationOptions::ProbePrecompiled to false 2022-05-10 16:58:13 +02:00
Rewrite.cpp [libclang] Add CXRewriter to libclang API 2020-09-04 14:17:03 -07:00
libclang.map Add clang_CXXMethod_isDeleted function 2022-09-21 11:12:48 -04:00
linker-script-to-export-list.py SONAME introduce option CLANG_FORCE_MATCHING_LIBCLANG_SOVERSION 2022-08-25 08:36:01 +02:00