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 /lib/Frontend/ASTUnit.cpp | |
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 'lib/Frontend/ASTUnit.cpp')
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 926e017f16..4980f2dcc3 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -1666,6 +1666,7 @@ void AugmentedCodeCompleteConsumer::ProcessCodeCompleteResults(Sema &S, if (!Context.getPreferredType().isNull()) { if (C->Kind == CXCursor_MacroDefinition) { Priority = getMacroUsagePriority(C->Completion->getTypedText(), + S.getLangOptions(), Context.getPreferredType()->isAnyPointerType()); } else if (C->Type) { CanQualType Expected |