Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,8 @@ Bug Fixes to Compiler Builtins

- Fix ``__has_builtin`` incorrectly returning ``false`` for some C++ type traits. (#GH111477)

- Fix ``__builtin_source_location`` incorrectly returning wrong column for method chains. (#GH119129)

Bug Fixes to Attribute Support
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
18 changes: 18 additions & 0 deletions clang/test/SemaCXX/source_location.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,3 +1012,21 @@ int h = Var<int>;


}

namespace GH119129 {
struct X{
constexpr int foo(std::source_location loc = std::source_location::current()) {
return loc.line();
}
};
static_assert(X{}.foo() == __LINE__);
static_assert(X{}.
foo() ==__LINE__);
static_assert(X{}.


foo() ==__LINE__);
#line 10000
static_assert(X{}.
foo() == 10001);
}
Loading