[all-commits] [llvm/llvm-project] da55e9: [Sema] Address-space sensitive index check for unb...

Chris Hamilton via All-commits all-commits at lists.llvm.org
Mon Sep 14 16:15:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: da55e9ba1273284f1af61bceeaeb25e487838034
      https://github.com/llvm/llvm-project/commit/da55e9ba1273284f1af61bceeaeb25e487838034
  Author: Chris Hamilton <Chris.Hamilton at ericsson.com>
  Date:   2020-09-14 (Mon, 14 Sep 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/Sema/const-eval.c
    A clang/test/Sema/unbounded-array-bounds.c
    M clang/test/SemaCXX/constant-expression-cxx1y.cpp

  Log Message:
  -----------
  [Sema] Address-space sensitive index check for unbounded arrays

Check applied to unbounded (incomplete) arrays and pointers
to spot cases where the computed address is beyond the
largest possible addressable extent of the array, based
on the address space in which the array is delcared, or
which the pointer refers to.

Check helps to avoid cases of nonsense pointer math and
array indexing which could lead to linker failures or
runtime exceptions.  Of particular interest when building
for embedded systems with small address spaces.

Reviewed By: aaron.ballman

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




More information about the All-commits mailing list