llvm-project/clang/tools/libclang
Sam McCall ece4e92085 [CodeComplete] Basic code completion for attribute names.
Only the bare name is completed, with no args.
For args to be useful we need arg names. These *are* in the tablegen but
not currently emitted in usable form, so left this as future work.

C++11, C2x, GNU, declspec, MS syntax is supported, with the appropriate
spellings of attributes suggested.
`#pragma clang attribute` is supported but not terribly useful as we
only reach completion if parens are balanced (i.e. the line is not truncated)

There's no filtering of which attributes might make sense in this
grammatical context (e.g. attached to a function). In code-completion context
this is hard to do, and will only work in few cases :-(

There's also no filtering by langopts: this is because currently the
only way of checking is to try to produce diagnostics, which requires a
valid ParsedAttr which is hard to get.
This should be fairly simple to fix but requires some tablegen changes
to expose the logic without the side-effect.

Differential Revision: https://reviews.llvm.org/D107696
2021-08-12 23:49:10 +02:00
..
ARCMigrate.cpp
BuildSystem.cpp
CIndex.cpp [clang] Introduce SourceLocation::[U]IntTy typedefs. 2021-07-21 10:45:46 +01:00
CIndexCXX.cpp
CIndexCodeCompletion.cpp [CodeComplete] Basic code completion for attribute names. 2021-08-12 23:49:10 +02:00
CIndexDiagnostic.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CIndexDiagnostic.h
CIndexHigh.cpp
CIndexInclusionStack.cpp SourceManager: Clarify that FileInfo always has a ContentCache, NFC 2020-10-23 12:38:53 -04:00
CIndexUSRs.cpp
CIndexer.cpp [SystemZ][z/OS] Set more text files as text 2021-04-19 09:31:46 -04:00
CIndexer.h Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CLog.h Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CMakeLists.txt [clang] Fix libclang linking on Solaris 2021-08-07 21:14:15 +02:00
CXComment.cpp [Wdocumentation] Implement \anchor 2019-12-21 14:52:21 +01:00
CXComment.h
CXCompilationDatabase.cpp
CXCursor.cpp [OpenMP] Implement '#pragma omp unroll'. 2021-06-10 14:30:17 -05:00
CXCursor.h [clang] Reformat cindex. NFC. 2020-03-25 11:11:48 -05:00
CXIndexDataConsumer.cpp Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC 2020-11-02 15:11:51 -05:00
CXIndexDataConsumer.h [NFC] Fix typos in Clangd and Clang 2019-12-16 10:54:40 +01:00
CXLoadedDiagnostic.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
CXLoadedDiagnostic.h
CXSourceLocation.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
CXSourceLocation.h [libclang] Fix error handler in translateSourceLocation. 2021-06-18 13:43:14 +01:00
CXStoredDiagnostic.cpp
CXString.cpp
CXString.h
CXTranslationUnit.h
CXType.cpp [Clang] Introduce Swift async calling convention. 2021-07-09 11:50:10 -07:00
CXType.h
CursorVisitor.h [libclang]: visit BindingDecl in DecompositionDecl 2020-05-02 22:18:31 +02:00
FatalErrorHandler.cpp NFC, add a missing stdlib include for the use of abort 2020-09-29 08:50:51 -07:00
Index_Internal.h
Indexing.cpp Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC 2020-11-13 17:47:17 -05:00
Rewrite.cpp [libclang] Add CXRewriter to libclang API 2020-09-04 14:17:03 -07:00
libclang.map [clang] Fix libclang linking on Solaris 2021-08-07 21:14:15 +02:00
linker-script-to-export-list.py libclang: Fixes for the python script that generates the export list 2021-07-26 18:39:53 -07:00