https://llvm.org/bugs/show_bug.cgi?id=23891
Bug ID: 23891
Summary: scoped enumeration error messages are an embarrassment
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
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. =[ =[ =[
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs