Skip to content

Commit bc9f3bc

Browse files
Cite PR #723 that currently tracks the _Ptr source location bug.
1 parent a83daa6 commit bc9f3bc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clang/lib/3C/Utils.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -624,8 +624,12 @@ SourceRange getDeclSourceRangeWithAnnotations(
624624

625625
// Partial workaround for a compiler bug where if D has certain checked
626626
// pointer types such as `_Ptr<int *(void)>` (seen in the partial_checked.c
627-
// regression test), D->getSourceRange() returns only the _Ptr token (TODO:
628-
// file an issue). Always extend the range at least through the name (given by
627+
// regression test), D->getSourceRange() returns only the _Ptr token. (As of
628+
// this writing on 2021-11-18, no bug report has been filed against the
629+
// compiler, but https://github.com/correctcomputation/checkedc-clang/pull/723
630+
// tracks our work on the bug.)
631+
//
632+
// Always extend the range at least through the name (given by
629633
// D->getLocation()). That fixes the `_Ptr<int *(void)> x` case but not cases
630634
// with additional syntax after the name, such as `_Ptr<int *(void)> x[10]`.
631635
SourceLocation DeclLoc = D->getLocation();

0 commit comments

Comments
 (0)