This is an archive of the discontinued LLVM Phabricator instance.

[clang] Check ValueDependent instead of InstantiationDependent before executing the align expr for builtin align functions.
ClosedPublic

Authored by hokein on Jul 2 2020, 12:24 PM.

Details

Summary

in general, value dependent is a subset of instnatiation dependent. This
would allows us to produce diagnostics for the align expression (which
is instantiation dependent but not value dependent).

Diff Detail

Event Timeline

hokein created this revision.Jul 2 2020, 12:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 2 2020, 12:24 PM
arichardson accepted this revision.Jul 2 2020, 3:52 PM
arichardson added inline comments.
clang/test/SemaCXX/builtin-align-cxx.cpp
40

Could also change this to template <typename T, long A = 31> and add another __builtin_align_up(array, A) but I'm not sure whether that increases test coverage.

This revision is now accepted and ready to land.Jul 2 2020, 3:52 PM
hokein updated this revision to Diff 275299.Jul 2 2020, 11:44 PM
hokein marked an inline comment as done.

add more test.

This revision was automatically updated to reflect the committed changes.