-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzergood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
Bugzilla Link | 23891 |
Version | unspecified |
OS | All |
CC | @DougGregor,@Weverything |
Extended Description
I just got the worst syntax error message I've seen in a long time:
In file included from ../lib/CodeGen/PostRASchedulerList.cpp:27:
../include/llvm/Analysis/AliasAnalysis.h:129:57: error: invalid operands to binary expression ('llvm::FunctionModRefLocation' and 'llvm::ModRefInfo')
DoesNotAccessMemory = FunctionModRefLocation::Nowhere | ModRefInfo::NoModRef,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~
../include/llvm/Analysis/AliasAnalysis.h:137:48: error: invalid operands to binary expression ('llvm::FunctionModRefLocation' and 'llvm::ModRefInfo')
FunctionModRefLocation::ArgumentPointees | ModRefInfo::Ref,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
../include/llvm/Analysis/AliasAnalysis.h:145:48: error: invalid operands to binary expression ('llvm::FunctionModRefLocation' and 'llvm::ModRefInfo')
FunctionModRefLocation::ArgumentPointees | ModRefInfo::ModRef,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
../include/llvm/Analysis/AliasAnalysis.h:153:54: error: invalid operands to binary expression ('llvm::FunctionModRefLocation' and 'llvm::ModRefInfo')
OnlyReadsMemory = FunctionModRefLocation::Anywhere | ModRefInfo::Ref,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
The bug is that these are scoped enumerations and so there is no |
operator (it would require an implicit conversion to int
). But the error message literally tells me nothing other than that there is an error. =[ =[ =[
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillac++clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzergood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute