Skip to content
Commit 3925fbc8 authored by Aaron Ballman's avatar Aaron Ballman
Browse files

nullptr returned from ActOnTag() is not a valid result

DeclResult tracks two states: valid/invalid and usable/unusable.
Passing a null pointer to the constructor creates a valid but unusable
result and we wanted an invalid result instead. This changes some
functions to return a DeclResult rather than a Decl * to make it harder
to get this incorrect in callers.

Discovered when working on https://reviews.llvm.org/D141280

.

Co-authored-by: default avatarHaojian Wu <hokein@google.com>
Co-authored-by: default avatarAaron Ballman <aaron@aaronballman.com>

Differential Revision: https://reviews.llvm.org/D141580
parent df950a04
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment