This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Fix incorrect enum token namespace
ClosedPublic

Authored by etienneb on May 28 2016, 12:04 PM.

Details

Summary

This patch fix the scoping of enum literal. They were not resolving
to the right type.

It was not causing any problem as one is a copy of the other one.

The literal in the switch are resolving to Sema.h:5527

enum AccessResult {
  AR_accessible,
  AR_inaccessible,
  AR_dependent,
  AR_delayed
};

Instead of SemaAccess.cpp:27

/// A copy of Sema's enum without AR_delayed.
enum AccessResult {
  AR_accessible,
  AR_inaccessible,
  AR_dependent
};

This issue was found by a new clang-tidy check (still on-going).

Diff Detail

Event Timeline

etienneb updated this revision to Diff 58898.May 28 2016, 12:04 PM
etienneb retitled this revision from to [Sema] Fix incorrect enum token namespace.
etienneb updated this object.
etienneb added a reviewer: rsmith.
etienneb added a subscriber: cfe-commits.
aaron.ballman accepted this revision.May 31 2016, 5:54 AM
aaron.ballman edited edge metadata.

LGTM!

This revision is now accepted and ready to land.May 31 2016, 5:54 AM
etienneb closed this revision.Jun 1 2016, 2:23 PM