[PATCH] D117238: [C2x] Add BITINT_MAXWIDTH support
Shubham Sandeep Rastogi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 28 15:08:34 PST 2022
rastogishubham added inline comments.
================
Comment at: clang/lib/Sema/SemaType.cpp:2271-2274
+ const TargetInfo &TI = getASTContext().getTargetInfo();
+ if (NumBits > TI.getMaxBitIntWidth()) {
Diag(Loc, diag::err_bit_int_max_size)
+ << IsUnsigned << TI.getMaxBitIntWidth();
----------------
Seems like this change broke the greendragon
https://green.lab.llvm.org/green/job/lldb-cmake/40733/console
Can you please take a look and either fix or revert your change?
Error message:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: error: use of overloaded operator '<<' is ambiguous (with operand types 'const clang::StreamingDiagnostic' and 'typename remove_reference<unsigned long &>::type' (aka 'unsigned long'))
DB << std::move(V);
~~ ^ ~~~~~~~~~~~~
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Sema/Sema.h:1686:16: note: in instantiation of function template specialization 'clang::DiagnosticBuilder::operator<<<unsigned long, void>' requested here
BaseDiag << std::move(V);
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Sema/Sema.h:1760:24: note: in instantiation of function template specialization 'clang::Sema::ImmediateDiagBuilder::operator<<<unsigned long, void>' requested here
*ImmediateDiag << std::move(V);
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Sema/SemaType.cpp:2274:23: note: in instantiation of function template specialization 'clang::Sema::SemaDiagnosticBuilder::operator<<<unsigned long, void>' requested here
<< IsUnsigned << TI.getMaxBitIntWidth();
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1399:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1405:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1421:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1427:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, unsigned long)
DB << std::move(V);
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, int)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, long long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, __int128)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, unsigned int)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, unsigned long long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(int, unsigned __int128)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(long long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(__int128, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(unsigned int, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(unsigned long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(unsigned long long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1352:8: note: built-in candidate operator<<(unsigned __int128, unsigned long)
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Sema/SemaType.cpp:13:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Sema/TypeLocBuilder.h:17:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/ASTContext.h:19:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/CanonicalType.h:17:
In file included from /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/AST/Type.h:29:
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: error: use of overloaded operator '<<' is ambiguous (with operand types 'const clang::StreamingDiagnostic' and 'typename remove_reference<unsigned long &>::type' (aka 'unsigned long'))
DB << std::move(V);
~~ ^ ~~~~~~~~~~~~
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Sema/Sema.h:1762:58: note: in instantiation of function template specialization 'clang::PartialDiagnostic::operator<<<unsigned long, void>' requested here
S.DeviceDeferredDiags[Fn][*PartialDiagId].second << std::move(V);
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/lib/Sema/SemaType.cpp:2274:23: note: in instantiation of function template specialization 'clang::Sema::SemaDiagnosticBuilder::operator<<<unsigned long, void>' requested here
<< IsUnsigned << TI.getMaxBitIntWidth();
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1399:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1405:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1421:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/Diagnostic.h:1427:35: note: candidate function
inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB,
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, unsigned long)
DB << std::move(V);
^
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, int)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, long long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, __int128)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, unsigned int)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, unsigned long long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(int, unsigned __int128)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(long long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(__int128, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(unsigned int, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(unsigned long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(unsigned long long, unsigned long)
/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/clang/include/clang/Basic/PartialDiagnostic.h:71:8: note: built-in candidate operator<<(unsigned __int128, unsigned long)
2 errors generated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117238/new/
https://reviews.llvm.org/D117238
More information about the cfe-commits
mailing list