diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 0c150ffeed..5e2e732572 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -2027,6 +2027,12 @@ bool Sema::CheckSizeOfAlignOfOperand(QualType exprType, return true; } + if (Context.hasSameUnqualifiedType(exprType, Context.OverloadTy)) { + Diag(OpLoc, diag::err_sizeof_alignof_overloaded_function_type) + << !isSizeof << ExprRange; + return true; + } + return false; } |