If a macro is defined on the command line and then overridden in the source code, this is likely to be an error in the user's build system. We should warn on this.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
60 ms | x64 windows > LLVM.CodeGen/XCore::threads.ll |
Event Timeline
Comment Actions
The test here doesn't currently warn - because test5 is already defined, and as such the line under t5: is lexed as:
def textequ <redef>
I need to check how ML.EXE handles this!
Comment Actions
(this didn't have me as a reviewer, so I only saw it by coincidence)
We should also add the /WX switch :)
If I read it right, this isn't ready to go yet, right?
Comment Actions
That was added in https://reviews.llvm.org/D92504.
If I read it right, this isn't ready to go yet, right?
Correct; I need to investigate more corner cases in ML.EXE. It's unclear how ML.EXE handles redefinitions... when I read the spec as suggesting that (e.g.) test5 should be replaced by def before the line is even parsed!
Comment Actions
This required a few too many changes; I'll re-upload a working variant on top of a prerequisite (D103993).