This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf8a9c55bef38: [clang][Interp] Emit diagnostic when comparing
function pointers (authored by tbaeder).
Changed prior to commit:
https://reviews.llv
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/Interp.h:652-653
+ const SourceInfo &Loc = S.Current->getSource(OpPC);
+ S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
+ << LS << RS;
+ return false;
tbaeder wrote:
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/Interp.h:652-653
+ const SourceInfo &Loc = S.Current->getSource(OpPC);
+ S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
+ << LS << RS;
+ return false;
aaron.ballman wrote:
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: clang/lib/AST/Interp/Interp.h:652-653
+ const SourceInfo &Loc = S.Current->getSource(OpPC);
+ S.FFDiag(Loc, diag::note_constexpr_pointer_comp
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/Interp.h:652-653
+ const SourceInfo &Loc = S.Current->getSource(OpPC);
+ S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
+ << LS << RS;
+ return false;
aaron.ballman wrote:
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/Interp.h:652-653
+ const SourceInfo &Loc = S.Current->getSource(OpPC);
+ S.FFDiag(Loc, diag::note_constexpr_pointer_comparison_unspecified)
+ << LS << RS;
+ return false;
Can we pass in
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Function pointers can be compared for (in)equalit