Patch: Add support for &@selector()

Hi,

the attached patch might fix PR7390.

Random trivia: GCC happily compiles SEL a; @selector(foo) = a;.

Nico

clang-addrofsel-3.patch (2.74 KB)

the attached patch might fix PR7390.

Random trivia: GCC happily compiles SEL a; @selector(foo) = a;.

Fariborz, I saw that you just committed http://llvm.org/viewvc/llvm-project?view=rev&revision=106235 for the bug. With your patch, clang now treats @selectors() as lvalues and compiles SEL a; @selector(foo) = a; without complaint. I think that’s wrong.

Nico

the attached patch might fix PR7390.

Random trivia: GCC happily compiles SEL a; @selector(foo) = a;.

Fariborz, I saw that you just committed http://llvm.org/viewvc/llvm-project?view=rev&revision=106235 for the bug. With your patch, clang now treats @selectors() as lvalues and compiles SEL a; @selector(foo) = a; without complaint. I think that’s wrong.

Sorry, our patches crossed path. I will take a look at this regression.

  • Fariborz