-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Closed
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
After #90500 -- some of our internal code stopped compiling.
$ ~/llvm-build-upstream/bin/clang /tmp/Out.cpp
/tmp/Out.cpp:3:9: warning: #pragma once in main file [-Wpragma-once-outside-header]
3 | #pragma once
| ^
/tmp/Out.cpp:65:14: error: invalid argument type 'T *' to unary expression
65 | *item_ = -item_;
| ^~~~~~
1 warning and 1 error generated.
File attached.
repro.cpp.txt
cc: @erichkeane / @sdkrystian
I don't exclude that our code might be incorrect, but I wonder why this only applies to operator-
(and not operator+
)
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"questionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!