isa<CXXDestructorDecl>(MD))
return;
- if (MD->getLocation().isMacroID()) {
- SourceLocation MacroLoc = getSourceManager().getSpellingLoc(MD->getLocation());
- if (getSourceManager().isInSystemHeader(MacroLoc))
+ SourceLocation Loc = MD->getLocation();
+ SourceLocation SpellingLoc = Loc;
+ if (getSourceManager().isMacroArgExpansion(Loc))
+ SpellingLoc = getSourceManager().getImmediateExpansionRange(Loc).first;
+ SpellingLoc = getSourceManager().getSpellingLoc(SpellingLoc);
+ if (SpellingLoc.isValid() && getSourceManager().isInSystemHeader(SpellingLoc))
return;
- }
-
+
if (MD->size_overridden_methods() > 0) {
Diag(MD->getLocation(), diag::warn_function_marked_not_override_overriding)
<< MD->getDeclName();
// override-system-header.h to test out 'override' warning.
// rdar://18295240
#define END_COM_MAP virtual unsigned AddRef(void) = 0;
+
+#define STDMETHOD(method) virtual void method
+#define IFACEMETHOD(method) STDMETHOD(method)