[OpenCL] Move addr space deduction to Sema.

Authored by Anastasia on Nov 27 2019, 3:03 AM.


[OpenCL] Move addr space deduction to Sema.

In order to simplify implementation we are moving add space
deduction into Sema while constructing variable declaration
and on template instantiation. Pointee are deduced to generic
addr space during creation of types.

This commit also

  • fixed addr space dedution for auto type;
  • factors out in a separate helper function OpenCL specific logic from type diagnostics in var decl.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65744