summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2019-05-02 20:38:14 +0000
committerLeonard Chan <leonardchan@google.com>2019-05-02 20:38:14 +0000
commitfae4e4715c9bc8ceb9b3714d5c08813363890b7f (patch)
tree8994356a0cce2feee0f0cd07cc2ebc180c7fe81c /lib/CodeGen/CodeGenFunction.cpp
parentc1150d547616902e07d68c5b51f466bac8ff1883 (diff)
downloadclang-fae4e4715c9bc8ceb9b3714d5c08813363890b7f.tar.gz
[Attribute/Diagnostics] Print macro if definition is an attribute declaration
If an address_space attribute is defined in a macro, print the macro instead when diagnosing a warning or error for incompatible pointers with different address_spaces. We allow this for all attributes (not just address_space), and for multiple attributes declared in the same macro. Differential Revision: https://reviews.llvm.org/D51329 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@359826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 7a8d79ba3b..d7bb4a54c1 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -2149,6 +2149,7 @@ void CodeGenFunction::EmitVariablyModifiedType(QualType type) {
case Type::Attributed:
case Type::SubstTemplateTypeParm:
case Type::PackExpansion:
+ case Type::MacroQualified:
// Keep walking after single level desugaring.
type = type.getSingleStepDesugaredType(getContext());
break;