summaryrefslogtreecommitdiff
path: root/include/clang/Sema/CodeCompleteConsumer.h
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2009-11-04 15:04:32 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2009-11-04 15:04:32 +0000
commit51fb8b013e7734b795139f49d3b1f77c539be20a (patch)
tree59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /include/clang/Sema/CodeCompleteConsumer.h
parent73490b890977362d28dd6326843a1ecae413921d (diff)
Update clang to r86025.vendor/clang/clang-r86025
Notes
svn path=/vendor/clang/dist/; revision=198893 svn path=/vendor/clang/clang-r86025/; revision=198895; tag=vendor/clang/clang-r86025
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r--include/clang/Sema/CodeCompleteConsumer.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h
index d2f509df7b2c..5b3522c9eb49 100644
--- a/include/clang/Sema/CodeCompleteConsumer.h
+++ b/include/clang/Sema/CodeCompleteConsumer.h
@@ -26,6 +26,7 @@ namespace clang {
class FunctionDecl;
class FunctionType;
class FunctionTemplateDecl;
+class IdentifierInfo;
class NamedDecl;
class NestedNameSpecifier;
class Sema;
@@ -150,7 +151,8 @@ public:
/// \brief Describes the kind of result generated.
enum ResultKind {
RK_Declaration = 0, //< Refers to a declaration
- RK_Keyword //< Refers to a keyword or symbol.
+ RK_Keyword, //< Refers to a keyword or symbol.
+ RK_Macro //< Refers to a macro
};
/// \brief The kind of result stored here.
@@ -164,6 +166,9 @@ public:
/// \brief When Kind == RK_Keyword, the string representing the keyword
/// or symbol's spelling.
const char *Keyword;
+
+ /// \brief When Kind == RK_Macro, the identifier that refers to a macro.
+ IdentifierInfo *Macro;
};
/// \brief Describes how good this result is, with zero being the best
@@ -199,6 +204,12 @@ public:
QualifierIsInformative(0), StartsNestedNameSpecifier(false),
Qualifier(0) { }
+ /// \brief Build a result that refers to a macro.
+ Result(IdentifierInfo *Macro, unsigned Rank)
+ : Kind(RK_Macro), Macro(Macro), Rank(Rank), Hidden(false),
+ QualifierIsInformative(0), StartsNestedNameSpecifier(false),
+ Qualifier(0) { }
+
/// \brief Retrieve the declaration stored in this result.
NamedDecl *getDeclaration() const {
assert(Kind == RK_Declaration && "Not a declaration result");