[llvm] c0f9d7b - [MCParser] Modernize CppHashInfoTy (NFC)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 10 10:30:48 PDT 2023


I'm getting an error from this with gcc

llvm/lib/MC/MCParser/MasmParser.cpp: In constructor
‘{anonymous}::MasmParser::MasmParser(llvm::SourceMgr&, llvm::MCContext&,
llvm::MCStreamer&, const llvm::MCAsmInfo&, tm, unsigned int)’:
llvm/lib/MC/MCParser/MasmParser.cpp:1095:53: error: use of deleted function
‘constexpr {anonymous}::MasmParser::CppHashInfoTy::CppHashInfoTy()’
       CurBuffer(CB ? CB : SM.getMainFileID()), TM(TM) {
llvm/lib/MC/MCParser/MasmParser.cpp:441:5: note: ‘constexpr
{anonymous}::MasmParser::CppHashInfoTy::CppHashInfoTy() noexcept (false)’
is implicitly deleted because its exception-specification does not match
the implicit exception-specification ‘noexcept’
     CppHashInfoTy() = default;


~Craig


On Sat, Jun 10, 2023 at 9:02 AM Kazu Hirata via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Kazu Hirata
> Date: 2023-06-10T09:02:26-07:00
> New Revision: c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b
>
> URL:
> https://github.com/llvm/llvm-project/commit/c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b
> DIFF:
> https://github.com/llvm/llvm-project/commit/c0f9d7b0e6199ca3bde5a6d0036a8ada0bb6253b.diff
>
> LOG: [MCParser] Modernize CppHashInfoTy (NFC)
>
> Added:
>
>
> Modified:
>     llvm/lib/MC/MCParser/MasmParser.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/lib/MC/MCParser/MasmParser.cpp
> b/llvm/lib/MC/MCParser/MasmParser.cpp
> index d522b77c25874..1502d70fddfb0 100644
> --- a/llvm/lib/MC/MCParser/MasmParser.cpp
> +++ b/llvm/lib/MC/MCParser/MasmParser.cpp
> @@ -435,10 +435,10 @@ class MasmParser : public MCAsmParser {
>    /// The values from the last parsed cpp hash file line comment if any.
>    struct CppHashInfoTy {
>      StringRef Filename;
> -    int64_t LineNumber;
> +    int64_t LineNumber = 0;
>      SMLoc Loc;
> -    unsigned Buf;
> -    CppHashInfoTy() : LineNumber(0), Buf(0) {}
> +    unsigned Buf = 0;
> +    CppHashInfoTy() = default;
>    };
>    CppHashInfoTy CppHashInfo;
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230610/cf8f247b/attachment.html>


More information about the llvm-commits mailing list