summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/complete-preprocessor.m
Commit message (Collapse)AuthorAgeFilesLines
* [CodeComplete] Fix completion at the end of keywordsIlya Biryukov2018-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Make completion behave consistently no matter if it is run at the start, in the middle or at the end of an identifier that happens to be a keyword or a macro name. Since completion is often ran on incomplete identifiers, they may turn into keywords by accident. For example, we should produce same results for all of these completion points: // ^ is completion point. ^class cla^ss class^ Previously clang produced different results for the last case (as if the completion point was after a space: `class ^`). This change also updates some offsets in tests that (unintentionally?) relied on the old behavior. Reviewers: sammccall, bkramer, arphaman, aaron.ballman Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45887 llvm-svn: 330717
* [libclang] Always report a CXCursor_MacroDefinition for code-completionArgyrios Kyrtzidis2012-09-271-2/+2
| | | | | | results for a macro name, not CXCursor_NotImplemented. llvm-svn: 164740
* Tweak code-completion result priorities, so that exact and similarDouglas Gregor2010-10-191-41/+41
| | | | | | | | | type matches have a bigger impact. The impetus for this change was that, when initializing an enumeration value, we want enumerators of that enumeration type to have a higher priority than, e.g., unrelated local variables. llvm-svn: 116774
* Code completion has no reason to prefer values over types, especiallyDouglas Gregor2010-09-201-7/+7
| | | | | | | | at the statement level or in Objective-C message receivers. Therefore, just give types and declarations the same basic priority, and adjust from there. llvm-svn: 114374
* Swap the priorities of constants and types, so that we prefer types.Douglas Gregor2010-09-161-7/+7
| | | | llvm-svn: 114086
* When combining the code-completion results from Sema long with theDouglas Gregor2010-08-251-0/+7
| | | | | | | | code-completion results cached by ASTUnit, sort the resulting result set. This makes testing far, far easier, so this commit also includes tests for the previous few fixes. llvm-svn: 112070
* In code-completion contexts where both types and other values areDouglas Gregor2010-08-241-7/+7
| | | | | | | | | present, prefer values to types, since it's more common to compute with values than it is to declare new entities or perform type casts. So, tweak the ranking of types vs. other declarations and constants accordingly. llvm-svn: 111998
* Remove i386 macro check from expected output of preprocessorDouglas Gregor2010-08-241-1/+0
| | | | llvm-svn: 111984
* Implement code completion for preprocessor expressions and in macroDouglas Gregor2010-08-241-0/+17
| | | | | | arguments. llvm-svn: 111976
* Implement preprocessor code completion where a macro name is expected,Douglas Gregor2010-08-241-1/+11
| | | | | | | e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname> expression in a preprocessor conditional. llvm-svn: 111954
* Introduce basic code-completion support for preprocessor directives,Douglas Gregor2010-08-241-0/+47
e.g., after a "#" we'll suggest #if, #ifdef, etc. llvm-svn: 111943
OpenPOWER on IntegriCloud