summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeCompletion/macros.c
Commit message (Collapse)AuthorAgeFilesLines
* [CodeComplete] Fix completion at the end of keywordsIlya Biryukov2018-04-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Macro history (de-)serialization. Deserialization currently reads only the ↵Alexander Kornienko2012-09-251-0/+12
| | | | | | | | | | | | | | | | latest macro definition. Needs more work. Summary: Passes all tests (+ the new one with code completion), but needs a thorough review in part related to modules. Reviewers: doug.gregor Reviewed By: alexfh CC: cfe-commits, rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D41 llvm-svn: 164610
* Only prove macros as code-completion results when we're in a caseDouglas Gregor2010-04-061-4/+0
| | | | | | | statement or for ordinary names. This means that we won't show macros when completing, e.g., member expressions such as "p->". llvm-svn: 100555
* Improve the sorting of code-completion results. We now always sort byDouglas Gregor2010-01-131-7/+8
| | | | | | | | the "typed" text, first, then take into account nested-name-specifiers, name hiding, etc. This means that the resulting sort is actually alphabetical :) llvm-svn: 93370
* Teach Preprocessor::macro_begin/macro_end to lazily load all macroDouglas Gregor2010-01-041-7/+8
| | | | | | | | definitions from a precompiled header. This ensures that code-completion with macro names behaves the same with or without precompiled headers. llvm-svn: 92497
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Remove RUN: true lines.Daniel Dunbar2009-11-081-1/+0
| | | | llvm-svn: 86432
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-2/+2
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Various improvements to Clang's code-completion infrastructure:Douglas Gregor2009-11-071-2/+2
| | | | | | | | | | | | | | - Introduce more code-completion string "chunk" kinds that describe symbols, the actual text that the user is expected to type, etc. - Make the generation of macro results optional, since it can be slow - Make code-completion accessible through the C API, marshalling the code-completion results through a temporary file (ick) to maintain process separation. The last doesn't have tests yet. llvm-svn: 86306
* Include macros in code-completion resultsDouglas Gregor2009-10-301-0/+37
llvm-svn: 85594
OpenPOWER on IntegriCloud