diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-20 21:11:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-20 21:11:48 +0000 |
commit | b05496dbd63f03bf474dae2c4d1e2142608780cc (patch) | |
tree | e3f6e054547bf217be671a2e081f573000dd38d6 /include/clang/Sema/CodeCompleteConsumer.h | |
parent | 957b03be80ee712344bc0ff67c5ab7d768e88005 (diff) |
Tweak priorities for some types and macros:
- In Objective-C, we prefer BOOL to bool for historic reasons;
slightly penalize "bool".
- Treat Nil macro as a NULL pointer constant.
- Treat YES, NO, true, and false macros as constants.
- Treat the bool macro as a type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/CodeCompleteConsumer.h')
-rw-r--r-- | include/clang/Sema/CodeCompleteConsumer.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Sema/CodeCompleteConsumer.h b/include/clang/Sema/CodeCompleteConsumer.h index c251cedaf3..7da0fc77e9 100644 --- a/include/clang/Sema/CodeCompleteConsumer.h +++ b/include/clang/Sema/CodeCompleteConsumer.h @@ -81,7 +81,11 @@ enum { /// \brief The selector of the given message exactly matches the selector /// of the current method, which might imply that some kind of delegation /// is occurring. - CCD_SelectorMatch = -3 + CCD_SelectorMatch = -3, + + /// \brief Adjustment to the "bool" type in Objective-C, where the typedef + /// "BOOL" is preferred. + CCD_bool_in_ObjC = 1 }; /// \brief Priority value factors by which we will divide or multiply the @@ -122,9 +126,12 @@ QualType getDeclUsageType(ASTContext &C, NamedDecl *ND); /// /// \param MacroName The name of the macro. /// +/// \param LangOpts Options describing the current language dialect. +/// /// \param PreferredTypeIsPointer Whether the preferred type for the context /// of this macro is a pointer type. unsigned getMacroUsagePriority(llvm::StringRef MacroName, + const LangOptions &LangOpts, bool PreferredTypeIsPointer = false); /// \brief Determine the libclang cursor kind associated with the given |