Skip to content

Commit af6fe8b

Browse files
committed
[Code completion] Don't include non-freestanding macros in results.
1 parent 5be3dee commit af6fe8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/IDE/CompletionLookup.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,8 @@ void CompletionLookup::addEnumElementRef(const EnumElementDecl *EED,
17831783
void CompletionLookup::addMacroExpansion(const MacroDecl *MD,
17841784
DeclVisibilityKind Reason) {
17851785
if (!MD->hasName() || !MD->isAccessibleFrom(CurrDeclContext) ||
1786-
MD->shouldHideFromEditor())
1786+
MD->shouldHideFromEditor() ||
1787+
!isFreestandingMacro(MD->getMacroRoles()))
17871788
return;
17881789

17891790
CodeCompletionResultBuilder Builder(

0 commit comments

Comments
 (0)