diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2019-01-23 18:02:17 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2019-01-23 18:02:17 +0000 |
commit | b0d74bfe81b6cb4119b2e943fb2df35e30b4f4dd (patch) | |
tree | 1469d1f81aa76042482c8d874c78fed5b283a025 /clang/lib/Sema/SemaDeclAttr.cpp | |
parent | 25ce596cd111ba93777338412ff9731b16f45cc6 (diff) | |
download | bcm5719-llvm-b0d74bfe81b6cb4119b2e943fb2df35e30b4f4dd.tar.gz bcm5719-llvm-b0d74bfe81b6cb4119b2e943fb2df35e30b4f4dd.zip |
Merge similar target diagnostics for interrupt attribute into one; NFC
Patch by Kristina Bessonova!
llvm-svn: 351969
Diffstat (limited to 'clang/lib/Sema/SemaDeclAttr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 5e9f27001d6..010095da577 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -5543,14 +5543,14 @@ static void handleMSP430InterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { - S.Diag(D->getLocation(), diag::warn_msp430_interrupt_attribute) - << 0; + S.Diag(D->getLocation(), diag::warn_interrupt_attribute_invalid) + << /*MSP430*/ 1 << 0; return; } if (!getFunctionOrMethodResultType(D)->isVoidType()) { - S.Diag(D->getLocation(), diag::warn_msp430_interrupt_attribute) - << 1; + S.Diag(D->getLocation(), diag::warn_interrupt_attribute_invalid) + << /*MSP430*/ 1 << 1; return; } @@ -5618,14 +5618,14 @@ static void handleMipsInterruptAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { - S.Diag(D->getLocation(), diag::warn_mips_interrupt_attribute) - << 0; + S.Diag(D->getLocation(), diag::warn_interrupt_attribute_invalid) + << /*MIPS*/ 0 << 0; return; } if (!getFunctionOrMethodResultType(D)->isVoidType()) { - S.Diag(D->getLocation(), diag::warn_mips_interrupt_attribute) - << 1; + S.Diag(D->getLocation(), diag::warn_interrupt_attribute_invalid) + << /*MIPS*/ 0 << 1; return; } @@ -5772,12 +5772,14 @@ static void handleRISCVInterruptAttr(Sema &S, Decl *D, } if (hasFunctionProto(D) && getFunctionOrMethodNumParams(D) != 0) { - S.Diag(D->getLocation(), diag::warn_riscv_interrupt_attribute) << 0; + S.Diag(D->getLocation(), diag::warn_interrupt_attribute_invalid) + << /*RISC-V*/ 2 << 0; return; } if (!getFunctionOrMethodResultType(D)->isVoidType()) { - S.Diag(D->getLocation(), diag::warn_riscv_interrupt_attribute) << 1; + S.Diag(D->getLocation(), diag::warn_interrupt_attribute_invalid) + << /*RISC-V*/ 2 << 1; return; } |